3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = ['a'=>'b','c'=>'d','e'=>'f']; $a = serialize($arr); echo $a.'<br>'; var_dump(unserialize($a)).'<br>'; echo json_encode($arr).'<br>'; echo msgpack_pack($arr) ?>
based on Q9tBu
Output for 7.0.0 - 7.2.0
a:3:{s:1:"a";s:1:"b";s:1:"c";s:1:"d";s:1:"e";s:1:"f";}<br>array(3) { ["a"]=> string(1) "b" ["c"]=> string(1) "d" ["e"]=> string(1) "f" } {"a":"b","c":"d","e":"f"}<br> Fatal error: Uncaught Error: Call to undefined function msgpack_pack() in /in/gcHqb:9 Stack trace: #0 {main} thrown in /in/gcHqb on line 9
Process exited with code 255.
Output for 5.4.0 - 5.6.28
a:3:{s:1:"a";s:1:"b";s:1:"c";s:1:"d";s:1:"e";s:1:"f";}<br>array(3) { ["a"]=> string(1) "b" ["c"]=> string(1) "d" ["e"]=> string(1) "f" } {"a":"b","c":"d","e":"f"}<br> Fatal error: Call to undefined function msgpack_pack() in /in/gcHqb on line 9
Process exited with code 255.