Edit report at https://bugs.php.net/bug.php?id=63298&edit=1
ID: 63298 Updated by: bj...@php.net Reported by: nat at nath dot is Summary: Nothing resolves upwards in PHP -Status: Open +Status: Not a bug Type: Feature/Change Request Package: *General Issues Operating System: Unix PHP Version: 5.4.7 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2012-10-26 18:51:52] dagguh at gmail dot com 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. ------------------------------------------------------------------------ [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