There should be a simple question. I don't have 5.3 yet, so I can't experiment myself.
When declaring a namespace in an included file, is it necessary to declare the full namespace path, or is it the parent namespace that is supposed to be included?
For example, if I have a file:
<?php
namespace parent_space;
include 'file2.php';
?>
and second file:
<?php
namespace child_space;
?>
Since it is file2.php
included from the namespace parent_space
in file1.php
, is it a namespace for "some code" \parent_space\child_space\
, or is it simple \child_space\
?
source
share