September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool assert (mixed assertion) Checks whether an assertion is false.
Returns:
FALSE if assertion fails
Description:
This is similar to the C function of the same name. A piece of code is evaluated by the function; if FALSE is returned from the function, a warning is generated indicating the file and line number where the assertion failed. This function should only be used to debug code or return values from functions.
You can modify the output and behavior of this function by using the assert_options() function or by modifying the php.ini file.
assert() callbacks are particularly useful for building automated test suites because they allow you to easily capture the code passed to the assertion, along with information on where the assertion ...
Read now
Unlock full access