|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-01-11 04:44 UTC] christian at rishoj dot net
Description:
------------
The expression
'GLOBALS' == 0
evaluates to true.
Reproduce code:
---------------
php -r 'echo ('GLOBALS' == 0) ? 'yes' : 'no'; echo "\n";'
Expected result:
----------------
no
Actual result:
--------------
yes
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 15:00:01 2025 UTC |
Turn on error_reporting, this is the expected behaviuor php -r 'echo ('GLOBALS' == 0) ? 'yes' : 'no'; echo "\n";' PHP Notice: Use of undefined constant GLOBALS - assumed 'GLOBALS' in Command line code on line 1 PHP Notice: Use of undefined constant yes - assumed 'yes' in Command line code on line 1 yes