Php namespace details

Source: Internet
Author: User
This example describes the usage of the PHP namespace. I would like to share it with you for your reference. the namespace (namespace) is equivalent to functions and classes and is divided into a region, so that the same page can have the same require class, functions with the same name: less names are used in projects. php: & amp; lt ;? For php naming, use the compound name namespace & amp; nbsp; me \ mine; class & amp; nbsp; me {& amp; nbsp; & amp; nb... this example describes the usage of the PHP namespace. I would like to share it with you for your reference. the namespace (namespace) is equivalent to functions and classes and is divided into a region, so that the same page can have the same require class, functions with the same name: less names are used in projects. php: ';} Public function name () {& nb

1. PHP namespace usage instance analysis

Introduction: it is an important feature of a namespace to allow alias reference or import external fully qualified names. This is similar to creating symbolic connections to other files or directories in unix-like file systems. The PHP namespace supports two alias or import methods: use an alias for the class name or use an alias for the namespace name. Note that PHP does not support importing functions or constants.

[Related Q & A recommendations ]:

What does PHP namespace use mean?

What does PHP namespace mean? I read the help file. don't let me read it.

Php namespace problems

Thinkphp-PHP namespace problems?

The above is a detailed description of the php namespace. For more information, see other related articles in the first PHP community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.