note 79172 added to functions.returning-values
| From: | davidmatfantasyprints dot co dot uk at osu1 dot php dot net | Date: | Wed, 14 Nov 2007 09:38:57 +0000 |
| Subject: | note 79172 added to functions.returning-values | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132257@lists.php.net to get a copy of this message | ||
to: mmamedov ::> pub [at] turkmenweb d0t c0m
the code
if (someFunction == '0') { //mind quotes!
// do something
}
should be
if (someFunction() == '0') { //mind quotes!
// do something
}
you always have to call the function, your original code only checks if the function exists or not
----
Server IP: 87.124.64.96
Probable Submitter: 81.137.229.181
----
Manual Page -- http://www.php.net/manual/en/functions.returning-values.php
Edit -- https://master.php.net/note/edit/79172
Del: integrated -- https://master.php.net/note/delete/79172/integrated
Del: useless -- https://master.php.net/note/delete/79172/useless
Del: bad code -- https://master.php.net/note/delete/79172/bad+code
Del: spam -- https://master.php.net/note/delete/79172/spam
Del: non-english -- https://master.php.net/note/delete/79172/non-english
Del: in docs -- https://master.php.net/note/delete/79172/in+docs
Del: other reasons-- https://master.php.net/note/delete/79172
Reject -- https://master.php.net/note/reject/79172
Search -- https://master.php.net/manage/user-notes.php