-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/src/php/ext/standard/tests/array/
File Upload :
Current File : //usr/src/php/ext/standard/tests/array/unexpected_array_mod_bug.phpt

--TEST--
Crash when function parameter modified via reference
--FILE--
<?php
function usercompare($a,$b) {
  unset($GLOBALS['my_var'][2]); 
  return 0;
}
$my_var = array(1 => "entry_1",
2 => "entry_2",
3 => "entry_3",
4 => "entry_4",
5 => "entry_5");
usort($my_var, "usercompare");

echo "Done.\n";
?>
--EXPECTF--

Warning: usort(): Array was modified by the user comparison function in %s on line %d
Done.

Copyright © 2017 || Recoded By Mr.Bumblebee