3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = 'O:+8:"stdClass":0:{}'; $obj = unserialize($value); $ret = (bool)preg_match('/(^|;|{|})O:\+?[0-9]+:"/', $value); var_dump($value, $ret, $obj);
based on gbKq6
Output for 7.2.0
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.3.19 - 7.1.10
string(20) "O:+8:"stdClass":0:{}" bool(true) object(stdClass)#1 (0) { }