PHP language Constructor

Source: Internet
Author: User
Isset and empty look like functions. We often use them as functions, but they are actually language constructors. The language constructor in php is equivalent to the predefined macro in C. It is a keyword defined in the php language and cannot be modified or disabled. The function in php is different. It is a function and is executed

Isset and empty look like functions. We often use them as functions, but they are actually language constructors. The language constructor in php is equivalent to the predefined macro in C. It is a keyword defined in the php language and cannot be modified or disabled. The function in php is different. It is a function and is executed

Isset and empty look like functions. We often use them as functions, but they are actually language constructors.

The language constructor in php is equivalent to the predefined macro in C. It is a keyword defined in the php language and cannot be modified or disabled.

The functions in php are different. They are functions that will be parsed during execution and then passed in parameter calculation.

Therefore, the execution efficiency of functions is not as high as that of the language constructor.

For example, we can determine whether an array contains a key. Using isset ($ arr [$ key]) is more efficient than array_key_exists ($ arr, $ key.

 

The language constructor in php includes:

Echo

Print

Die

Isset

Unset

Include

Require

Array

List

Empty

 

References

Http://blog.sina.com.cn/s/blog_475429950100hk75.html

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.