4 ms·
It seems like there could be some performance benefits in pre-compiling or "pre-parsing" PHP. For instance, the compiler could copy specific functions or class
by aasarava 18y ago
It seems like there could be some performance benefits in pre-compiling or "pre-parsing" PHP. For instance, the compiler could copy specific functions or classes from an include file and save them right into the script where they're actually used -- therefore eliminating the performance hit of managing include files at runtime.
Now, as to whether there's a benefit to learning an entirely new language in order to do this, I'm not so sure. Why not extend (and simplify) PHP while still using PHP syntax and grammar, the way jQuery does for JavaScript?
- paulgb 18y ago> Now, as to whether there's a benefit to learning an entirely new language in order to do this, I'm not so sure. Why not extend (and simplify) PHP while still using PHP syntax and grammar, the way jQuery does for JavaScript? jQuery can do this because, despite its quirks, JavaScript is actually a well designed programming language. It has goodies like closures, anonymous functions, and first class functions, so it is fairly extensible. PHP is just a glorified template language with wrappers to C functions.