<?php
namespace Foo {
class Bar {}
}
namespace {
use Foo\Bar as HttpClient;
$rc = new \ReflectionClass('HttpClient');
var_dump($rc->getName()); // string() ""
}
Fatal error: Uncaught ReflectionException: Class "HttpClient" does not exist in /in/VL5Ve:10
Stack trace:
#0 /in/VL5Ve(10): ReflectionClass->__construct('HttpClient')
#1 {main}
thrown in /in/VL5Ve on line 10
Process exited with code 255.
Fatal error: Uncaught ReflectionException: Class HttpClient does not exist in /in/VL5Ve:10
Stack trace:
#0 /in/VL5Ve(10): ReflectionClass->__construct('HttpClient')
#1 {main}
thrown in /in/VL5Ve on line 10
Process exited with code 255.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class HttpClient does not exist' in /in/VL5Ve:10
Stack trace:
#0 /in/VL5Ve(10): ReflectionClass->__construct('HttpClient')
#1 {main}
thrown in /in/VL5Ve on line 10
Process exited with code 255.