Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-28-2005, 01:39 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 

Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,217
ADAM Web Design RepRank 0
Default PHP speed question

Okay, I'm something of a newcomer to PHP...I've messed around with it a bit, but nothing serious, as I prefer ASP (to each their own though).

Anyway, I haven't found any conclusive documentation on this, but I'm wondering if, like ASP, <? ?> counts as a time stop and if blank lines would still be processed in code due to JIT compilation of such.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 04-29-2005, 06:05 AM
WebProWorld New Member
 

Join Date: Jul 2004
Posts: 18
vark RepRank 0
Default

Hi Adam,
I don't use ASP but, regarding the time stop question I've never heard of that with PHP. As you probably know all PHP processing happens between <?php ?> or <? ?>. I've never heard/read anything about <? ?> counting as a time stop and I've been using PHP close to 3 years. When ever I've wanted to see the execute time either for the script or for code blocks within the script I do something similar to:


function getmicrotime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}

$time = getmicrotime();

#
# benchmark code here
#

echo "

Time elapsed: ",getmicrotime() - $time, " seconds";
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0