Edit report at https://bugs.php.net/bug.php?id=63298&edit=1
ID: 63298 Comment by: dagguh at gmail dot com Reported by: nat at nath dot is Summary: Nothing resolves upwards in PHP Status: Open Type: Feature/Change Request Package: *General Issues Operating System: Unix PHP Version: 5.4.7 Block user comment: N Private report: N New Comment: your Animal class is not in global namespace, but in MyProject. You gotta import it via: use MyProject\Animal; This request is invalid BTW. Namespaces should be all in lowercase. Previous Comments: ------------------------------------------------------------------------ [2012-10-17 22:25:08] nat at nath dot is Description: ------------ --- >From manual page: http://www.php.net/language.namespaces.global --- I would love to use namespaces, but it seems kind of silly that nothing in PHP resolves upwards (be that variables, classes, constants or functions). Test script: --------------- https://gist.github.com/3908714/c7639b02a8a4fc2c13ebfbcb35e41d17ab1b8d44 Expected result: ---------------- whoof Actual result: -------------- Fatal error: Class 'MyProject\Animal\Animal' not found in /Users/Nathaniel/Projects/test/animal/dog.php on line 5 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63298&edit=1