Loading…

What is namespace in PHP?

Namespace allows us to use the same function or class name in different parts of the same program without causing a name collision.

Example

                                        

Namespace MyAPP;
   function output() {
   echo 'IOS!';
}

namespace MyNeWAPP;
   function output(){
   echo 'RSS!';
}

Suggest An Answer

No suggestions avaliable!

Latest post from PHP interview questions

Ask Question