3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'C:+8:"stdClass":0:{}'; $obj = unserialize($value); $ret = (bool)preg_match('/(^|;|{|})O:\+?[0-9]+:"/', $value); var_dump($value, $ret, $obj);
Output for 8.3.0 - 8.3.7
Warning: unserialize(): Error at offset 0 of 20 bytes in /in/FtiRJ on line 4 string(20) "C:+8:"stdClass":0:{}" bool(false) bool(false)
Output for 7.2.0 - 7.2.33, 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 0 of 20 bytes in /in/FtiRJ on line 4 string(20) "C:+8:"stdClass":0:{}" bool(false) bool(false)
Output for 7.3.32 - 7.3.33
string(20) "C:+8:"stdClass":0:{}" bool(false) bool(false)
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33
Warning: Class stdClass has no unserializer in /in/FtiRJ on line 4 string(20) "C:+8:"stdClass":0:{}" bool(false) object(stdClass)#1 (0) { }

preferences:
215.85 ms | 402 KiB | 329 Q