3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __toString() { return 'a'; } } $a = new Foo(); $b = new Foo(); $list = [$a, $b]; natcasesort($list); print_r($list);
Output for 7.0.0 - 7.2.0
Array ( [0] => Foo Object ( ) [1] => Foo Object ( ) )
Output for 5.4.10 - 5.6.28
Array ( [1] => Foo Object ( ) [0] => Foo Object ( ) )
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/msYeu on line 14
Process exited with code 255.