3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $serialized_array = serialize(array(1234=>array("something"=>"foobar"))); echo "Serialized Array: $serialized_array" . PHP_EOL; $array = unserialize($serialized_array); print_r($array); if (array_key_exists(1234, $array)) { echo "Key Exists!"; } else { echo "Key Not Found!"; }
based on HoLLP
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
Serialized Array: a:1:{i:1234;a:1:{s:9:"something";s:6:"foobar";}} Array ( [1234] => Array ( [something] => foobar ) ) Key Exists!