3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo{ public $foo = ''; function __construct(){ $this->foo = "string"; } function __destruct(){ var_dump( $foo ); } } $ex = new foo(); var_dump($ex->foo);
based on 1tWKI
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.8
string(6) "string" Notice: Undefined variable: foo in /in/cM9Vk on line 10 NULL