3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['name' => 'foo'], ]; usort($array, function ($a, $b) { return strcmp($a['name'], $b['nope']); }); echo 'after calling usort:'.PHP_EOL.PHP_EOL; var_dump($array);
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
after calling usort: array(1) { [0]=> array(1) { ["name"]=> string(3) "foo" } }

preferences:
46.12 ms | 406 KiB | 5 Q