<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Fair enough.&nbsp; The only things I would disagree with is that 1) Just
because there are only 2500 in the source code doesn't mean that they
don't get looped over quite a bit, and 2) my Mac Pro Quad Xeon with 4GB
of memory behaves all that much different than the Quad Xeon 4GB
webservers that we and our clients have deployed :) <br>
<br>
The original question came out of the coder module which recommended
these changes for better "performance", and I looked into it, and
several other projects recommend using lower case for these constants,
as well as a couple bugs on the php.net bug list.&nbsp; I actually prefer
writing with upper case, so the only point was if there was any real
world gain.<br>
<br>
Here are the links I had found:<br>
<br>
<a class="moz-txt-link-freetext" href="http://bugs.php.net/bug.php?id=27286&edit=1">http://bugs.php.net/bug.php?id=27286&amp;edit=1</a><br>
<a class="moz-txt-link-freetext" href="http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft)?showComments=false#PHPCodingStandard%28draft%29-BooleansandtheNULLValue">http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft)?showComments=false#PHPCodingStandard%28draft%29-BooleansandtheNULLValue</a><br>
<a class="moz-txt-link-freetext" href="http://drupal.org/node/121388">http://drupal.org/node/121388</a><br>
<a class="moz-txt-link-freetext" href="http://ilia.ws/archives/12-PHP-Optimization-Tricks.html">http://ilia.ws/archives/12-PHP-Optimization-Tricks.html</a><br>
<br>
<br>
Other PHP software that use lower case true, false and null standard:<br>
<br>
PEAR Standard - <a class="moz-txt-link-freetext" href="http://pear.php.net/manual/en/standards.naming.php">http://pear.php.net/manual/en/standards.naming.php</a><br>
Joomla - <a class="moz-txt-link-freetext" href="http://help.joomla.org/content/view/826/125/">http://help.joomla.org/content/view/826/125/</a><br>
Mambo - <a class="moz-txt-link-freetext" href="http://www.source.mambo-foundation.org/content/view/117/69/">http://www.source.mambo-foundation.org/content/view/117/69/</a><br>
EZ Publish -
<a class="moz-txt-link-freetext" href="http://ez.no/ezpublish/documentation/development/standards/php">http://ez.no/ezpublish/documentation/development/standards/php</a><br>
Flyspray - <a class="moz-txt-link-freetext" href="http://flyspray.org/internal:conventions#constant_names">http://flyspray.org/internal:conventions#constant_names</a><br>
OSCommerce -
<a class="moz-txt-link-freetext" href="http://svn.oscommerce.com/fisheye/browse/osCommerce/tags/oscommerce-2.2rc1/STANDARD?r=1662">http://svn.oscommerce.com/fisheye/browse/osCommerce/tags/oscommerce-2.2rc1/STANDARD?r=1662</a><br>
phpMyAdmin - <a class="moz-txt-link-freetext" href="http://phpmyadmin.sourceforge.net/documentation/">http://phpmyadmin.sourceforge.net/documentation/</a><br>
Zen Cart -
<a class="moz-txt-link-freetext" href="http://www.zen-cart.com/wiki/index.php/Developers_Standards#Naming_Conventions">http://www.zen-cart.com/wiki/index.php/Developers_Standards#Naming_Conventions</a><br>
phpBB - <a class="moz-txt-link-freetext" href="http://area51.phpbb.com/docs/coding-guidelines.html#optimizing">http://area51.phpbb.com/docs/coding-guidelines.html#optimizing</a><br>
<br>
<br>
And finally, thank you Peter for updating the docs to clarify.<br>
<br>
Sorry to be a performance nut, but I can't help it.&nbsp; I think a lot of
us are a little OCD sometimes :D<br>
<br>
Steve Rude<br>
<br>
Konstantin K&auml;fer wrote:
<blockquote cite="mid:AE183F09-2B49-4FAF-94AB-E934773B10F6@gmail.com"
 type="cite"><br>
  <blockquote type="cite">1326ms vs. 1382ms is 60ms, and when normal
page load times are somewhere around 200ms, it makes a substantial
difference.
    <br>
  </blockquote>
  <br>
Even if we disregard the fact that microtime tests have a big stddev,
your test is not very convincing: You are using these constants several
hundred thousand times whereas Drupal only has 2500+ in its *entire*
source code. And of that source code, only a fraction gets to
execution. I'd estimate the number of constants that are actually
executed on a Drupal page view to about 500, and even that is probably
too high. If you extrapolate your results (60ms for 100000), you'll get
0.3 msecs. Besides, a real world server behaves quite different from a
desktop machine, especially in such edge cases.
  <br>
  <br>
Konstantin<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Steve Rude
+ Lead Developer</font><br>
<b><font color="#ff3300" face="Verdana, Arial, Helvetica, sans-serif"
 size="2">Achieve<font color="#666666">Internet</font></font></b><a><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">(800)
618-8777 x 202</font><br>
<br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">http://www.achieveinternet.com</font></a></div>
</body>
</html>