Working Within the Same Namespace
Consider the following code: myapp1.php:
1 2 3 4 5 6 7 8 9 10 |
<br /> &lt; ?php<br /> namespace AppLib1;<br /> require_once('lib1.php');<br /> require_once('lib2.php');<br /> header('Content-type: text/plain');<br /> echo MYCONST . &quot;n&quot;;<br /> echo MyFunction() . &quot;n&quot;;<br /> echo MyClass::WhoAmI() . &quot;n&quot;;<br /> ?&gt;<br /> |