3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'O:+8:"stdClass":0:{}'; $obj = unserialize($value); $ret = (bool)preg_match('/(^|;|{|})O:\+?[0-9]+:"/', $value); var_dump($value, $ret, $obj);

Abusive script

This script was stopped while abusing our resources

Output for 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Notice: unserialize(): Error at offset 0 of 20 bytes in /in/gpQLi on line 4 string(20) "O:+8:"stdClass":0:{}" bool(true) bool(false)
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.11, 5.6.15, 5.6.19 - 5.6.28, 5.6.30 - 5.6.40, 7.0.0, 7.0.2 - 7.0.3, 7.0.5 - 7.0.6, 7.0.8 - 7.0.33, 7.1.0, 7.1.2 - 7.1.33
string(20) "O:+8:"stdClass":0:{}" bool(true) object(stdClass)#1 (0) { }
Output for 5.6.12 - 5.6.14, 5.6.16 - 5.6.18, 5.6.29, 7.0.1, 7.0.4, 7.0.7, 7.1.1

Process exited with code 137.

preferences:
147.44 ms | 402 KiB | 196 Q