Name

assert

Synopsis

bool assert(string|bool assertion[, string description] )

If assertion is true, generates a warning in executing the code. If assertion is a string, assert() evaluates that string as PHP code. The optional second argument allows for additional text to be added in with the failure message. Check the assert_options() function to see its related connection.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.