3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Buzz { class A { public $foo = 'test Buzz'; } } namespace Bar { use Buzz\A; class B { protected $a; public function __construct(A $a) { $this->a = $a } public function show() { return $this->a->foo; } } } $ bar = new \Bar\B(new \Buzz\A); echo $bar->show();
Output for 5.3.0 - 5.4.20
Parse error: syntax error, unexpected '}' in /in/JRHc5 on line 19
Process exited with code 255.