Assert is a debugging feature that can be used during development to ensure that a condition is always true. Any expression can be asserted, as long as it evaluates to either true or false.
// Make sure $myVar is set
assert(isset($myVar));
Code assertions like this help validate that there are no execution paths that break the specified assumption. If this occurs, a warning showing the file and line number of the assertion is displayed, which makes it easy to locate and fix the mistake in the code.
Warning: assert(): Assertion failed in C:\xampp\htdocs\mypage.php on line 3
A description of the assertion ...