3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class toS { public function __toString() { return "A"; } } //var_dump(preg_replace('#A#si','B',$x=new Stringable())); $x=unserialize('a:1:{O:3:"toS":{};i:1;}'); var_dump($x);
based on pFfCv
Output for 5.4.45, 5.5.29 - 5.5.35, 5.6.13 - 7.2.0
Notice: unserialize(): Error at offset 5 of 23 bytes in /in/M96ek on line 11 bool(false)
Output for 5.3.18 - 5.4.44, 5.5.24 - 5.5.28, 5.6.8 - 5.6.12
Notice: unserialize(): Error at offset 18 of 23 bytes in /in/M96ek on line 11 bool(false)