3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); // so only PHP 7 will show up class FooBar { private $x; public function __construct() { var_dump($this); unset($this->x); // I can remove a property! var_dump($this->x); // It's gone! $this->x = 2; // I can recreate a property! var_dump($this->x); // The "new" property retains the "old" property's visibilty. Good job. } }
Output for 7.0.0 - 7.2.0
Output for 5.3.19 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/7eaoc on line 3