note 113432 added to function.assert
| From: | fabiano dot fa04 at gmail dot com | Date: | Wed, 09 Oct 2013 17:40:10 +0000 |
| Subject: | note 113432 added to function.assert | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196514@lists.php.net to get a copy of this message | ||
You can also use a function instead a string description as the second parameter.
<?php
function assertIsFalse(){
echo "Hey, this assert is false and I'm a function.";
}
$foo = "foo";
$bar = $foo;
$foo = "bar";
assert( $foo == $bar, assertIsFalse() );
?>
The result would be:
Hey, this assert is false and I'm a function.
----
Server IP: 69.147.83.199
Probable Submitter: 177.18.182.153
----
Manual Page -- http://php.net/manual/en/function.assert.php
Edit -- https://master.php.net/note/edit/113432
Del: integrated -- https://master.php.net/note/delete/113432/integrated
Del: useless -- https://master.php.net/note/delete/113432/useless
Del: bad code -- https://master.php.net/note/delete/113432/bad+code
Del: spam -- https://master.php.net/note/delete/113432/spam
Del: non-english -- https://master.php.net/note/delete/113432/non-english
Del: in docs -- https://master.php.net/note/delete/113432/in+docs
Del: other reasons-- https://master.php.net/note/delete/113432
Reject -- https://master.php.net/note/reject/113432
Search -- https://master.php.net/manage/user-notes.php