Declaring sub-namespace:
We all are familiar with the directory structure or the tree of the file and folders, similarly we can get the nested or sub namespaces in PHP, this technique helps us to achieve more manageability. If you have done Java or C# before then this topic will be more easier.
The following example is illustrating the concept of this topic, no output will be generated.
Example:
<?php
namespace mySpace\FirstLevel\SecondLevel;
function
myFunction(){
echo __FUNCTION__;}
class
One{
function myMethod(){
echo __METHOD__;}
}
?>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.