Reply to Re: Are PHP libraries linked dynamically or statically?

Your name:

Reply:


Posted by Toby A Inkster on 07/21/07 08:32

Jerry Stuckle wrote:

> Unless you have implemented a PHP optimizer, every PHP file is
> interpreted every time you load the file. There is no intermediate code.

There normally *is* an intermediate form, but it's discarded after each
execution unless you have a PHP cache, such as eAccelerator.

That is, on each execution, the PHP interpreter:

1. Opens up the file;
2. Tokenises it, storing the token stream in memory;
3. Parses it into a form of byte code, storing that in
memory too; then
4. Executes the byte code.

Most smart interpreters (and I assume PHP is included here) will also
perform a bit of code optimisation around stage 3 too. Code optimisation
trades off execution time for parsing time, so interpreters (optimise once,
run once) tend not to optimise as much as compilers (optimise once, run
many) do.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 30 days, 12:01.]

Parsing an HTML Table with PEAR's XML_HTTPSax3
http://tobyinkster.co.uk/blog/2007/07/20/html-table-parsing/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация