3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait Foo { public $hidden; function __call($name, $arguments) { echo 'hello from overload'; } } class Bar { use Foo; function hello() { echo 'hello from bar'; } } class Cheese { static function deleteMe($obj) { $obj->__destruct() } } $foo = new Bar(); Cheese::deleteMe($foo); gc_collect_cycles(); $foo->hello();
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '}' in /in/gVIFH on line 30
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/gVIFH on line 3
Process exited with code 255.