3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo{} $foo = array('foo' => 'foo', 'bar'=>array('bar'), 'x'=>new stdclass()); $bar = new Foo; $fooMsg = var_export($foo, true); $barMsg = var_export($bar, true); var_dump($fooMsg,$barMsg);
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
string(117) "array ( 'foo' => 'foo', 'bar' => array ( 0 => 'bar', ), 'x' => stdClass::__set_state(array( )), )" string(26) "Foo::__set_state(array( ))"
Output for 5.0.0 - 5.0.5
string(104) "array ( 'foo' => 'foo', 'bar' => array ( 0 => 'bar', ), 'x' => class stdClass { }, )" string(13) "class Foo { }"
Output for 4.3.0 - 4.4.9
string(104) "array ( 'foo' => 'foo', 'bar' => array ( 0 => 'bar', ), 'x' => class stdClass { }, )" string(13) "class foo { }"