1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/standard/tests/array/bug77395.phpt
2019-01-02 12:09:47 +08:00

17 lines
483 B
PHP

--TEST--
Bug #77395 (segfault about array_multisort)
--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
}
set_error_handler('error_handle');
$data = [['aa'=> 'bb',], ['aa'=> 'bb',],];
array_multisort(array_column($data, 'bb'),SORT_DESC, $data); // PHP Warning error
?>
--EXPECT--
array_multisort(): Array sizes are inconsistent