3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new stdClass(); $a->a = 'a'; $a->b = 'b'; $f = var_export($a,1); echo $f; var_export(eval($f));
Output for 7.0.0 - 7.1.0
stdClass::__set_state(array( 'a' => 'a', 'b' => 'b', )) Parse error: syntax error, unexpected end of file in /in/SSmaV(8) : eval()'d code on line 4
Process exited with code 255.
Output for 5.4.11 - 5.6.28
stdClass::__set_state(array( 'a' => 'a', 'b' => 'b', )) Parse error: syntax error, unexpected end of file in /in/SSmaV(8) : eval()'d code on line 4 false
Output for 5.4.0 - 5.4.10
stdClass::__set_state(array( 'a' => 'a', 'b' => 'b', )) Parse error: syntax error, unexpected end of file in /in/SSmaV(8) : eval()'d code on line 4 false
Process exited with code 255.
Output for 5.1.0 - 5.3.29
stdClass::__set_state(array( 'a' => 'a', 'b' => 'b', )) Parse error: syntax error, unexpected $end in /in/SSmaV(8) : eval()'d code on line 4 false
Process exited with code 255.
Output for 5.0.0 - 5.0.5
class stdClass { public $a = 'a'; public $b = 'b'; } Fatal error: Cannot redeclare class stdclass in /in/SSmaV(8) : eval()'d code on line 1
Process exited with code 255.
Output for 4.3.2 - 4.4.9
class stdClass { var $a = 'a'; var $b = 'b'; } Fatal error: Cannot redeclare class stdclass in /in/SSmaV(8) : eval()'d code on line 1
Process exited with code 255.
Output for 4.3.0 - 4.3.1
class stdClass { var $a = 'a'; var $b = 'b'; } Fatal error: Cannot redeclare class stdclass in /in/SSmaV(8) : eval()'d code on line 1