3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = ['a'=>'b','c'=>'d','e'=>'f']; echo serialize($arr).'<br>'; echo unserialize($arr).'<br>'; echo json_encode($arr).'<br>'; echo msgpack_pack($arr) ?>
based on ZgUXD
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> Warning: unserialize() expects parameter 1 to be string, array given in /in/aNae2 on line 6 <br>{"a":"b","c":"d","e":"f"}<br> Fatal error: Uncaught Error: Call to undefined function msgpack_pack() in /in/aNae2:8 Stack trace: #0 {main} thrown in /in/aNae2 on line 8
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> Warning: unserialize() expects parameter 1 to be string, array given in /in/aNae2 on line 6 <br>{"a":"b","c":"d","e":"f"}<br> Fatal error: Call to undefined function msgpack_pack() in /in/aNae2 on line 8
Process exited with code 255.