kphp
kphp copied to clipboard
Compile error when using `array_merge_into` and array without specified type
Example code:
<?php
function main()
{
$arr_one = [];
$arr_two = [];
if (1) {
$arr_one = [1, 2, 3];
}
$result = [];
array_merge_into($result, $arr_one);
array_merge_into($result, $arr_two);
var_dump($result);
}
main();
Problem c++ code:
array< int64_t > v$arr_one;
array< Unknown > v$arr_two;
array< int64_t > v$result;