note 61277 deleted from function.assert-options by aidan

From: Date: Mon, 30 Jan 2006 06:45:19 +0000
Subject: note 61277 deleted from function.assert-options by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-102708@lists.php.net to get a copy of this message
Note Submitter: Herbrt Peters Reason: useless ---- assert_options(ASSERT_CALLBACK, ...) can take a class function. Second parameter needs to be an array, first entry is the classname, followed by the functionname. Example: <?php assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_CALLBACK, array('a', 'assert')); class a { static function assert($file, $line, $code) { '<div style="border: thin dashed #999; background-color:#ccc"><h4>Assertion thrown</h4> <p>File: ' . $file . '<br/>Line: ' . $line . '<br/>Code: ' . $code . '</p></div>'; } } assert ('1 == 0'); ?>

« previous php.notes (#102708) next »