ID:               23721
 Updated by:       [EMAIL PROTECTED]
 Reported By:      max at fuck dot org
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: FreeBSD
 PHP Version:      4.3.1
 New Comment:

The language.types.boolean states that the TRUE/FALSE keywords are
case-insensitive.



I don't believe this requires any updates to the docs, unless someone
is persistent and wants to re-open.



Status -> Closed


Previous Comments:
------------------------------------------------------------------------

[2003-05-21 11:14:51] [EMAIL PROTECTED]

PHP groupees sometimes mention:



a) ++$i  is faster than $i++

b) 'foo' is faster than "foo"

c) echo  is faster than print

d) str_* is faster than regex

e) And now true is faster than TRUE!



Woohoo! My PHP scripts will be blazing fast!!! :)

------------------------------------------------------------------------

[2003-05-21 10:05:56] [EMAIL PROTECTED]

Code readability always outweights minor performance gains, IMO. :)





------------------------------------------------------------------------

[2003-05-21 08:57:42] max at fuck dot org

I don't think I would ever use true/false a million times. This came up
when talking to someone about which way was 'proper', whereas before it
didn't seem to make a difference and now to allow people who want to
write 'True' to get their way, it has been changed. While I don't think
this is a big performance problem or anything, I think in conjuction
with other little slow-downs on a high load site it could have an
effect on the speed. It's obviously faster than older versions
regardless of how you use it, but I don't think I have ever seen it
used in lowercase anywhere on the php website.

------------------------------------------------------------------------

[2003-05-21 03:11:08] [EMAIL PROTECTED]

Why do you use 1000000 times TRUE or FALSE in your programs anyway?

------------------------------------------------------------------------

[2003-05-21 02:01:07] [EMAIL PROTECTED]

Use of proper case is faster than "improper" case for case insensitive
constants.  This includes true/false, null, and define()'s third
parameter.  Not sure what others... or even if this really should be
documented? :)  AFAICT, this behavior does not affect magical case
insensitive constants such as __file__.



This difference is as of 4.2.3

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/23721

-- 
Edit this bug report at http://bugs.php.net/?id=23721&edit=1

Reply via email to