3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = (object) ["\0one\0two\0three\0four" => 'baz']; $bar = new class{ private $baz; }; print_r($foo); print_r($bar);
based on rlrIB
Output for 7.0.0 - 7.3.0alpha1
stdClass Object ( [threefour:one:private] => baz ) class@anonymous Object ( [baz:class@anonymous:private] => )
Output for hhvm-3.15.4
stdClass Object ( [twothreefour:one:private] => baz ) class@anonymous$;199247342 Object ( [baz:class@anonymous$;199247342:private] => )
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/tSvO2 on line 4
Process exited with code 255.