Share on Google+Share on Google+
Namespace in PHP
Posted on: April 1, 2010 at 12:00 AM
Advertisement
In this tutorial we will study about namespace in PHP, it is a new feature of PHP which is included in PHP 5.3.0. This is the index page on this topic, subsequent pages will focus on every point on this topic.

Namespace:

A namespace is a container which allows us to put the relevant classes, functions, objects etc. all together and helps us to make our programming better by allowing disambiguation of homonym items.

As per the rule of namespace we cannot assign same name to more than one class/function/namespace. For many modern computer/programming language a namespace is a context for identifiers.  Java uses this concept as package, C++ combines namespace and process names which is called as name mangling.

Following links will make your concept clearer:

 

Namespace Declaration
In this tutorial we will study about namespace declaration in PHP, how to declare namespace in PHP, how to access etc. Examples will make this clearer.
 
Calling Namespace
In this tutorial we will study about namespace declaration and calling from other file in PHP, how to call a namespace in PHP, how to access from outside the file etc. Examples will make this more clear.
 
Multiple Namespace
In this tutorial we will study about multiple namespace declaration in PHP, how to declare namespace in PHP, how to access etc. Examples will make this clearer.
 
Sub Namespace
In this tutorial we will study about sub namespace in PHP, how to declare namespace in PHP, how to access etc. Examples will make this clearer.
 
Advertisement

Related Tags for Namespace in PHP:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 1, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com