3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['name' => 'foo'], ['bar' => '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 git.master_jit, git.master
Warning: Undefined array key "nope" in /in/SuJRd on line 9 Deprecated: strcmp(): Passing null to parameter #2 ($string2) of type string is deprecated in /in/SuJRd on line 9 after calling usort: array(2) { [0]=> array(1) { ["bar"]=> string(3) "foo" } [1]=> array(1) { ["name"]=> string(3) "foo" } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.32 ms | 406 KiB | 5 Q