PHP options and Information function library: Assert

Source: Internet
Author: User
Keywords assert php option php Chinese function manual information function library
Tags aliyun check function function library html http information information function library

Assert

(PHP4 >= 4.0b4)

Assert---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Check if assertion is False

Syntax: int assert (String|bool assertion)

Description:

If it turns out that False,assert () will check the given assertion and take the appropriate action. The advantage of the string assertion is less on the head (pager overhead), when the assertion check ends, and the message contains the assertion representation, when the assertion fails.

Assertion should be used as a feature of error removal, you can use them to do a sound check (sanity-checks) to detect states (conditions), which will always be true and point to some programming errors.

Assertions will not have to be used as a normal execution, like an input parameter check. If the assertion check is inactive (not activated), it will always be corrected (correct).

The performance of assert () can be configured by Assert_option () or. ini-setting.

Related Article

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.