3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Something; class X{} class Y{} class Z{} namespace Somewhere; use Something; class A { public $x; public function __construct() { $this->x = new Something\X(); } } $a = new A(); var_dump($a->x);
based on KeoFd
Output for 5.6.38 - 7.2.11
object(Something\X)#2 (0) { }