3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php class Foo { public $foo = 'foo'; protected $bar = 'two'; private $baz = 'three'; } $a = new Foo(); $b = (array)$a; var_dump($a); var_dump($b); foreach ($b as $key => $val) { var_dump($key); var_dump($val); print "\n"; }
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected '<' in /in/KWuC9 on line 3
Process exited with code 255.