PHP Training in Chandigarh (8) - PowerPoint PPT Presentation

View by Category
About This Presentation

PHP Training in Chandigarh (8)


PHP Training in Chandigarh provided by CBitss Technologies at sector 34A for those who want to make their career in Web Development . For more information contact-us : 9914641983 – PowerPoint PPT presentation

Number of Views:2


Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: PHP Training in Chandigarh (8)

PHP Training in Chandigarh
What are namespaces in PHP?
  • In the extensive definition namespaces are a way
    of enclose items. This can be seen as an
  • abstract access in many places. For example, in
    any operating system agenda serve to group
  • similar files, and act as a namespace for the
    case within them.

Why Do We Need Namespaces in PHP?
  • As the size of your PHP code study increases, the
    more likely you will unwitting discuss a
  • function or class name that has been announced
    before. The problem is distributed if you
  • attempt to add third-party ingredient or plugins
    what if two or more code sets device a
  • Database class. The only solution has been long
    class/function names.

How are Namespaces Defined?
  • By default, all consistent, class and function
    names are arranged in a global space like
  • they were before namespaces were backed.
  • Namespaced code is decide using a single
    namespace keyword at the top of your PHP file.

  • PHP allows you to define a ranking of namespace
    names so libraries can be subdivided.
  • Sub-namespaces are detached using a backslash (\)
    character, e.g.
  • MyProject\SubName
  • MyProject\Database\MySQL
  • CompanyName\MyProject\Common\Widget

CBitss Technologies
  • 09988741983,0172-5031983

Website http//
CBitss Technologies