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(base64_encode(serialize($a))); print('\n'); $data ="O:1:\"T\":1:{s:10:\"Tallowed";i:0;}"; print($data); print('\n'); var_dump(unserialize($data)); ?>
based on 3eK04
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '}', expecting end of file in /in/KZX82 on line 11
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Parse error: syntax error, unexpected '}' in /in/KZX82 on line 11
Process exited with code 255.