diff --git a/functions/info.xml b/functions/info.xml index f520079b95..7d91fbffdf 100644 --- a/functions/info.xml +++ b/functions/info.xml @@ -2,6 +2,124 @@ PHP options & information PHP options/info + + + assert + Checks if assertion is false + + + Description + + + int assert + string|bool assertion + + + + assert will check the given + assertion and take appropriate + action if its result is false. + + + If the assertion is given as a string it + will be evaluated as PHP code by assert. + The advantages of a string assertion + are less overhead when assertion checking is off and messages + containing the assertion expression when + an assertion failes. + + + Assertion should be used as a debugging feature only. You may + use them for sanity-checks that test for conditions that should + always be true and that indicate some programming errors if not + or to check for the presence of certain features like extension + functions or certain system limits and features. + + + Assertions should not be used for normal runtime operations + like input parameter checks. As a rule of thumb your code + should always be able to work correct if assertion checking + is not activated. + + + The behavior of assert may be configured + by assert_options or by .ini-settings + described in that functions manual page. + + + + + + + assert-options + Set/get the various assert flags + + + Description + + + mixed assert_options + int what + mixed value + + + + Using assert_options you may set the various + assert control options or just query their current + settings. + + + assert options + + + + option + ini-parameter + default + description + + + + + ASSERT_ACTIVE + assert.active + 1 + enable assert evaluation + + + ASSERT_WARNING + assert.warning + 1 + issue a PHP warning for each failed assertion + + + ASSERT_BAIL + assert.bail + 0 + terminate execution on failed assertions + + + ASSERT_QUIET_EVAL + assert.quiet_eval + 0 + disable error_reporting during assertion expression evaluation + + + ASSERT_CALLBACK + assert_callback + (null) + user function to call on failed assertions + + + +
+ + assert_options will return the original setting + of any option or false on errors. + +
+
+ error_log