3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $intParam = 123;    $stringParam= 'I love the world';    $arrayParam = array(      "fruits"  => array("a" => "orange", "b" => "banana", "c" => "apple"),      "numbers" => array(1, 2, 3, 4, 5, 6),      "holes"   => array("first", 5 => "second", "third")    );    class Object    {      public $memu = "index";    }    $objectParam = new Object();        print 'serialize($intParam) output like this:<br />'.serialize($intParam).'<br /><br />';    print 'serialize($stringParam) output like this:<br />'.serialize($stringParam).'<br /><br />';    print 'serialize($arrayParam) output like this:<br />'.serialize($arrayParam).'<br /><br />';    print 'serialize($objectParam) output like this:<br />'.serialize($objectParam).'<br /><br />';        print 'unserialize(serialize($intParam)) result:<br />'.unserialize(serialize($intParam)).'<br /><br />';    print 'unserialize(serialize($stringParam)) result:<br />'.unserialize(serialize($stringParam)).'<br /><br />';    print 'unserialize(serialize($arrayParam)) result:<br />'.unserialize(serialize($arrayParam)).'<br /><br />';    print 'unserialize(serialize($objectParam)) result:<br />'.unserialize(serialize($objectParam)).'<br /><br />';  
based on NUbcV
Output for 5.4.0 - 5.4.34
Parse error: syntax error, unexpected '$stringParam' (T_VARIABLE) in /in/X1oeu on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/X1oeu on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_VARIABLE in /in/X1oeu on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/X1oeu on line 2
Process exited with code 255.