3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $tab = 'tabValue'; } $F = new Foo(); $data = (array)&$F; var_dump($data["bar"]); var_dump($data["\0*\0baz"]); var_dump($data["\0Foo\0tab"]); $data['\0Foo\0tab'] = "new_tabValue"; $F = (Foo)$data; var_dump($F);
Output for 5.3.0 - 5.4.29
Parse error: syntax error, unexpected '&' in /in/TgnXh on line 11
Process exited with code 255.