3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php public class Person { $id; $name; } $chaim = new Person(); $chaim->id = 1; $chaim->name = 'Chaim Brykman'; $a = array(new StdObject); $filtered = array_filter($a, function($i) { return $i; })[0]; print_r($filtered);
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/X3Sl8 on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_PUBLIC in /in/X3Sl8 on line 2
Process exited with code 255.