note 66184 deleted from function.get-magic-quotes-gpc by bjori
| From: | bjori@php.net | Date: | Tue, 16 May 2006 21:55:08 +0000 |
| Subject: | note 66184 deleted from function.get-magic-quotes-gpc by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-111414@lists.php.net to get a copy of this message | ||
Note Submitter: fede at phpimpact dot com
Reason: in docs
----
get_magic_quotes_gpc() returns an Integer, 0 or 1, and not a Boolean.
The expression (!get_magic_quotes_gpc()) ? (expr2) : (expr3) evaluates to expr2 if expr1 evaluates
to TRUE, and expr3 if expr1 evaluates to FALSE.
So, the right way to check if magic quotes is ON or OFF is:
((bool)get_magic_quotes_gpc() == TRUE)) ? (expr2) : (expr3);
and notâ¦
(!get_magic_quotes_gpc()) ? (expr2) : (expr3);