PHP is compiled into bytecode, which is then interpreted on top of something like a virtual machine. Many other scripting languages follow the same general process, including Perl and Ruby. This is not a traditional interpreted language such as BASIC.
There would be no effective increase in speed if you tried to "minimize" the source. You will get a significant increase with a byte of bytecode such as APC .
Facebook introduced a compiler called HipHop that converts the PHP source into C ++ code. Rasmus Lerdorf, one of the big PHP guys, made a presentation on HHVM - a new virtual machine based on their work creating HipHop. This is still fairly new, and it is unclear whether it will provide a significant increase in productivity for the general public.
To make sure this is stated explicitly, read this entire presentation . He points to numerous ways to compare both profile code and identify bottlenecks using tools like xdebug and xhprof , also from Facebook.
Charles Nov 02 '10 at 16:41 2010-11-02 16:41
source share