PHP
PHP uses a blend of interpretation and compilation in order to provide the best mix of performance and flexibility to programmers.
Behind the scenes,
PHP compiles your script down to a series of instructions (called opcodes) whenever it is accessed. These instructions are then executed one by one until the script terminates. This is different from conventional compiled languages such as C++ where the code is compiled down to native executable code then that executable is run from then on. Instead,
PHP re-compiles your script each time it is requested.
This constant recompilation may seem a waste of processor time, but it is actually not all that bad because you no longer need to worry about hand recompiling your scripts when you make any changes. On the flip side, many scripts take longer to compile than they do to execute!
Furthermore, it provides very quick feedback during development. If you have an error somewhere in your file,
PHP will refuse to compile the page until you have fixed the problem, and you are able to step through execution of your code line by line until you find the problem.
The speed hit of regular compilation is nullified entirely by the use of
PHP accelerators.
One major advantage to having interpreted code is that all memory used by the script is managed by
PHP, and the language automatically cleans up after every script has finished. This means that you do not need to worry about closing database links, freeing memory assigned to images, and so on, because
PHP will do it for you. That is not to say you should be lazy and make
PHP do all the work - good programmers clean up themselves, and let
PHP work as backup in case something is missed.
ColdFusion
ColdFusion used to be quite popular back in the hey-days of the dot.com boom because it is developed using a proprietary IDE designed for novice programmers who have no wish to see source code of any complexity.
For such a wizard-oriented system, ColdFusion performs fairly well. Performance is nothing to be desired, but development speed is good. Perhaps ColdFusion's biggest let-down is the price tag - you will certainly need to sit down before you see it. ColdFusion was bought out by Macromedia, and this has served to boost its corporate appeal in places where open-source is still frowned upon.
The main drawback to using ColdFusion is arguably its user-friendliness, which might sound odd at first, but let me clarify. With
PHP and Perl, because the languages are so flexible, you have much more control over what happens and why. If something goes wrong in your code, it's normally very easy to track it down and solve the problem, or change your plans and implement a different solution to the same problem. Very often, stock ColdFusion has just one way to solve a problem, and this greatly reduces your control over the solution you make. However, at the very least, you can work using ColdFusion when you are in team with non-technical people.
The biggest advantage to ColdFusion is its IDE and the language it uses, "CFML" (ColdFusion Markup Language) - even junior programmers can learn the system and start making pages quickly. As a result, you will often find ColdFusion in use at very large companies where they use Visual Basic (another easy, but not very powerful or fast language) for offline work.