3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function getVars($obj) { var_dump(get_object_vars($obj)); } } $obj = (object) array( "\0*\0bar" => 1, "\0Foo\0baz" => 2, ); var_dump(get_object_vars($obj)); (new Foo())->getVars($obj); var_dump(Closure::bind(function ($obj) { var_dump($obj->bar, $obj->baz); }, $obj, 'Foo')->__invoke($obj)); var_dump($obj->{"\0*\0bar"}); var_dump($obj->{"\0Foo*\0baz"});