LPMJ Example E-4 (Click on the icon to view the source for copy and pasting)
<?php
$names = array();
assertTrue(sizeof($names) == 0);
$names[] = 'Bob';
assertTrue(sizeof($names) == 1);

function assertTrue($condition)
{
	if (!$condition) throw new Exception('Assertion failed.');
}
?>