PHP Training in Chandigarh (8) - PowerPoint PPT Presentation

About This Presentation
Title:

PHP Training in Chandigarh (8)

Description:

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:25

less

Transcript and Presenter's Notes

Title: PHP Training in Chandigarh (8)


1
PHP Training in Chandigarh
2
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.

3
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.

4
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.

5
Sub-namespaces
  • 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

6
CBitss Technologies
  • 09988741983,0172-5031983
  • counselor.cbitss_at_gmail.com

Website http//cbitss.in/php-training-in-chandig
arh/
7
CBitss Technologies
Write a Comment
User Comments (0)
About PowerShow.com