TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
624 B
27 lines
624 B
--TEST--
|
|
Bug #77395 (segfault about array_multisort)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
function error_handle($level, $message, $file = '', $line = 0)
|
|
{
|
|
$a = [1, 2, 3];
|
|
$b = [3, 2, 1];
|
|
echo $message;
|
|
array_multisort($a, SORT_ASC, $b);
|
|
// if comment this line, no segfault happen
|
|
}
|
|
function main()
|
|
{
|
|
set_error_handler('error_handle');
|
|
$data = [['aa' => 'bb'], ['aa' => 'bb']];
|
|
try {
|
|
array_multisort(array_column($data, 'bb'), SORT_DESC, $data);
|
|
// PHP Warning error
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . "\n";
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Array sizes are inconsistent
|
|
|