3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r(base64_decode('CmNsYXNzIHpvbWJpZQp7CiAgICBwcm90ZWN0ZWQgJHZhbDsKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdCgkdmFsKQogICAgewogICAgICAgICR0aGlzLT52YWwgPSAkdmFsOwogICAgfQoKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2Rlc3RydWN0KCkKICAgIHsKICAgICAgICAkdGhpcy0+dmVzc2VsID0gJHRoaXM7CiAgICB9CgogICAgcHVibGljIGZ1bmN0aW9uIF9fdG9TdHJpbmcoKQogICAgewogICAgICAgIHJldHVybiAkdGhpcy0+dmFsOwogICAgfQp9CgokYW5zd2VyID0gbmV3IHpvbWJpZSgiNDIiKTsKJGFuc3dlci0+dmVzc2VsID0gJiRhbnN3ZXI7'));
based on BF4pS
Output for 4.3.0 - 7.1.0
class zombie { protected $val; public function __construct($val) { $this->val = $val; } public function __destruct() { $this->vessel = $this; } public function __toString() { return $this->val; } } $answer = new zombie("42"); $answer->vessel = &$answer;