3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $a; private $b = 2; private $c = 3; public function __construct() { $this->a = function(){ echo $this->c; }; } } $foo = new Foo(); {$foo->a}(); $bar();
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '}' in /in/MP4KP on line 18
Process exited with code 255.