3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $horrible_array_of_stuff = array( array("fname" => "Owen", "sname" => "Dyckhoff", "age" => 27), array("fname" => "Joe", "sname" => "Bloggs", "age" => 36 ) ); usort( $horrible_array_of_stuff, function( $left, $right ) { return [$left->sname, $left->fname, $left->age] <=> [$right->sname, $right->fname, $right->age]; } );
based on 33l1f
Output for 7.2.0
Notice: Trying to get property 'sname' of non-object in /in/7pjCj on line 5 Notice: Trying to get property 'fname' of non-object in /in/7pjCj on line 5 Notice: Trying to get property 'age' of non-object in /in/7pjCj on line 5 Notice: Trying to get property 'sname' of non-object in /in/7pjCj on line 5 Notice: Trying to get property 'fname' of non-object in /in/7pjCj on line 5 Notice: Trying to get property 'age' of non-object in /in/7pjCj on line 5
Output for 7.0.0 - 7.1.10
Notice: Trying to get property of non-object in /in/7pjCj on line 5 Notice: Trying to get property of non-object in /in/7pjCj on line 5 Notice: Trying to get property of non-object in /in/7pjCj on line 5 Notice: Trying to get property of non-object in /in/7pjCj on line 5 Notice: Trying to get property of non-object in /in/7pjCj on line 5 Notice: Trying to get property of non-object in /in/7pjCj on line 5
Output for 5.4.10 - 5.6.28
Parse error: syntax error, unexpected '>' in /in/7pjCj on line 5
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/7pjCj on line 5
Process exited with code 255.