Acorn Arcade forums: Programming: PHP is turning into Java
|
PHP is turning into Java |
|
Hertzsprung (11:10 1/10/2003) Phlamethrower (11:15 1/10/2003) johnstlr (14:41 1/10/2003) Paolo Zaino (14:58 1/10/2003)
|
|
James Shaw |
Message #46825, posted by Hertzsprung at 11:10, 1/10/2003 |
Ghost-like
Posts: 1746
|
I'll have to download PHP5 and have a look. Exception handling has got to be a Good Thing, but I'm not sure if access specifiers are in the spirit of PHP.
Also, why does PHP not produce byte-code, or is that changing in Zend 2?
Interesting stuff.... |
|
[ Log in to reply ] |
|
Jeffrey Lee |
Message #46828, posted by Phlamethrower at 11:15, 1/10/2003, in reply to message #46825 |
Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff
Posts: 15100
|
Also, why does PHP not produce byte-code, or is that changing in Zend 2? Presumably because run-time compilation/interpretation/whatever is simpler to use than having to recompile code all the time, PHP can be integrated with HTML (and practically any other file format), etc. I guess that having a cache of precompiled files could be useful though (which may be something you can do at the moment, I dunno). |
|
[ Log in to reply ] |
|
Lee Johnston |
Message #46838, posted by johnstlr at 14:41, 1/10/2003, in reply to message #46828 |
Member
Posts: 193
|
http://turck-mmcache.sourceforge.net/
....caches compiled php. I suspect there are many more such solutions. |
|
[ Log in to reply ] |
|
Paolo Fabio Zaino |
Message #46840, posted by Paolo Zaino at 14:58, 1/10/2003, in reply to message #46825 |
Member
Posts: 61
|
PHP, as anyother scripting INTERPRET, is not a virtual machine...
A virtaul machine "emulate" a standard computer, provided by a "standard" processor, a "standard" operating system etc... when you make a "compile" operation on a virtual machine you transalate the hi-level code script into a bytecoded file that can be executed by the virtual - processor (it is similar to an assembly but usually it have a mid-level datastructure).
A scripting interpret just have: 1) global variables and local variables cache 2) functions and procedures cache 3) a language parser that is used for structure the scripting in a manageable way 4) a runtime executor of what the parser put in the right caches
Usualy an interpret just translate istructions words in a tokenized model for find them faster (basicaly you can imagine a token like a recordset key in a database and its parameters just like the recordset). The runtime will check the the "key" and will execute the corresponding internal routine passing to it the parameters joined to the token.
Of course it is possible to change its own nature makeing the scripting interpret work as a virtual machine (like ASP.NET that is completely rebuild for work on the M.S. CLI .NET) that is just an architectural decision and, not always, is the better way for have good software performances.
I think that a more better way is to save the pre-parsed script file in a cache (like old ASP does, and like my ZCLI CLI will do) and there some free products that do that for increase PHP performances.
[Edited by Paolo Zaino at 16:02, 1/10/2003] |
|
[ Log in to reply ] |
|
|
Acorn Arcade forums: Programming: PHP is turning into Java |