<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
You are outputting in seconds. Sure .06 seconds doesn't sound like a
lot, but when you multiply that times 1000 to get milliseconds, it
starts to look more substantial...<br>
<br>
1326ms vs. 1382ms is 60ms, and when normal page load times are
somewhere around 200ms, it makes a substantial difference.<br>
<br>
Steve Rude<br>
<br>
mark burdett wrote:
<blockquote
cite="mid:e1bd5b380708271210o39d296f3r5b0faaa10e6af508@mail.gmail.com"
type="cite">
<pre wrap="">Hi, in some simple command-line tests I could not find a difference (in php 5.2)
true: 1.32612895966 TRUE: 1.38275790215
true: 1.34794092178 TRUE: 1.39009809494
true: 1.34102320671 TRUE: 1.38674616814
true: 1.2856991291 TRUE: 1.27452993393
true: 1.34056401253 TRUE: 1.2749080658
true: 1.31166195869 TRUE: 1.33323001862
true: 1.34053897858 TRUE: 1.27428483963
true: 1.28342199326 TRUE: 1.33444595337
<?php
$loop = 0;
while ($loop < 8) {
$count = 0;
$start = microtime(true);
while ($count < 4000000) {
$test = true;
if (true) {
$count++;
}
}
echo ' true: ';
echo microtime(true) - $start;
$count = 0;
$start = microtime(true);
while ($count < 4000000) {
$test = TRUE;
if (TRUE) {
$count++;
}
}
echo ' TRUE: ';
echo microtime(true) - $start;
echo "\n";
$loop++;
}
--mark
On 8/27/07, Karoly Negyesi <a class="moz-txt-link-rfc2396E" href="mailto:karoly@negyesi.net"><karoly@negyesi.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I do not believe that true could be faster than TRUE when php is case agnostic about its identifiers. Maybe there is time taken to lowercase TRUE ... but if you can measure lowercasing four characters in the parsing stage where only ASCII is supported, congratulations.
About commas, yes the D5 menu defintiions are ugly sometimes. Have you seen D6 :) ?
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</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-877 x 202</font><br>
<br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">http://www.achieveinternet.com</font></a></div>
</body>
</html>