3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class T { private $allowed = 0; //function __destruct() { if ($this->allowed == 1) echo "SUCCESS"; } }; $a = new T(); print($a); //$data = 'O:1:"T":2:{s:10:"Tallowed";i:1;s:10:"Tallowen";i:1;}'; var_dump(unserialize($data)); ?>
based on bKMWm
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class T could not be converted to string in /in/eaX0f on line 9
Process exited with code 255.
Output for 5.3.21 - 7.0.20
Catchable fatal error: Object of class T could not be converted to string in /in/eaX0f on line 9
Process exited with code 255.