The parameters of the empty function can only be variables before the PHP5.5 version

Source: Internet
Author: User
PHP5.5 and the previous version of the empty function, the development needs to note that if your local development PHP version is more than PHP5.5, and the server is less than PHP5.5, pay more attention to this problem, the need for friends can refer to the next

Before the PHP5.5 version, empty parameters cannot be complex types such as functions, only variables.

Summarize the use scenario of the empty function:

Prior to 1.PHP 5.5, this function was used to check whether a variable was assigned a value of 0, False, an empty string, or null. Any argument in the form of a non-variable causes the function to error.
2.PHP 5.5 This function can be applied to any value, not limited to a variable. Can be constants, return values for functions, and so on.

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