PHP

29 04 2006

"…Think of using HTML like owning a car with no engine – the car might look great, but it will never actually do very much. If you will excuse the extension to the metaphor, PHP can take your sites into the fast lane, by allowing you to turn your static pages into exciting, ever-changing pages with only a little thinking. In essence, it is like putting a V6 engine into your car shell.." (Paul Hudson).

PHP 3 and before used an "execute while interpreting" paradigm which meant that PHP read a line of source code, interpreted it, executed it, read another, interpreted it, executed it, read another, etc. This meant that code was often re-read and re-interpreted twice or more, entirely unnecessarily (Paul Hudson).

PHP 4, with its new "compile first, execute later" paradigm read your entire script in and compiled it to byte code before execution, which produced a large speed increase – the average speed increase was about 100%, with some benchmarks showing up to a fifty-fold increase in speed when PHP 4 was pushed to its limits (Paul Hudson).

**"Byte code" is the name for the internal representation of your script that PHP can understand easily – it is usually a lot longer than your script as a result of each PHP statement being broken down into many simple byte code statements (Paul Hudson).

(source: PHP in a Nutshell (In a Nutshell) by Paul Hudson)

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s




%d bloggers like this: