Edit report at https://bugs.php.net/bug.php?id=65244&edit=1
ID: 65244 Updated by: a...@php.net Reported by: strategycon at yahoo dot com Summary: function_exist() returns false when using imported namespace alias Status: Open Type: Feature/Change Request Package: Reflection related Operating System: Ubuntu PHP Version: 5.3Git-2013-07-11 (snap) Block user comment: N Private report: N New Comment: Compile vs. execution phase is that. Previous Comments: ------------------------------------------------------------------------ [2013-07-11 15:47:36] strategycon at yahoo dot com Description: ------------ namespace mynamespace; use Symfony\Component\Validator\Constraints as Assert; class myClass { function classExists($name == 'NotBlank') { return function_exists('Assert\\' . $name) } function classExistsExt($name == 'NotBlank') { return function_exists('Symfony\Component\Validator\Constraints\\' . $name) } } myClass::classExists() // returns false myClass::classExists() // returns true Expected result: ---------------- To fully benefit from namespace importing and "aliasing", I would expect that method to return true when namespace alias is used instead of full/original one. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65244&edit=1