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.4.0 - 5.4.20
Parse error: syntax error, unexpected 'bar' (T_STRING), expecting variable (T_VARIABLE) or '$' in /in/fkUDp on line 28
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /in/fkUDp on line 28
Process exited with code 255.