RE: Just curious about the echo commnad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Lisi [mailto:lists@shemeshdirectory.co.il]
> Sent: 22 October 2002 18:52
> 
> There is one performance factor to consider, it's best to 
> reduce opening 
> and closing PHP since each time you open it there is another 
> call to the 
> server (I think - please correct me if I'm wrong!) which 
> could in theory 
> slow down your page loading, but I'm not sure how much this 
> really matters. 

Nope, you're wrong!

The PHP interpreter is called once when you invoke your script, and then
merrily parses its way right through the file.  In fact, I've seen it
suggested that it's actually slightly faster to drop in and out at need, as
the PHP engine isn't actually doing much work when it's scanning HTML --
it's just looking for the next <?, not doing all the complex parsing it has
to inside <?php ?> tags!

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux