<?php
namespace Foo {
class Bar {}
}
namespace Other {
use Foo\Bar as FooBar;
class Baz {
function test($instance) {
var_dump($instance instanceof FooBar);
}
}
$other = new Baz;
$other->test(new Bar);
}
Fatal error: Uncaught Error: Class "Other\Bar" not found in /in/Bt1k7:16
Stack trace:
#0 {main}
thrown in /in/Bt1k7 on line 16
Process exited with code 255.
Fatal error: Uncaught Error: Class 'Other\Bar' not found in /in/Bt1k7:16
Stack trace:
#0 {main}
thrown in /in/Bt1k7 on line 16
Process exited with code 255.