Quote:
|
I'm curious about this, can you expand a little bit?
|
Sure. But those will not be strongs facts, just impressions, and things I've heard/read in the past years.
PHP was developped at first as a CGI program to replace some keywords with computed values. Nothing more than a simple parser, as explain the acronym:
PHP: Hypertext Preprocessor
Being designed to be instantiated at a time X, and destroyed at a time X+Y milliseconds, I can understand that some neat features that we found in languages like C are not present, because the PHP engine rely on the underlying system for some fundamentals.
PHP has been designed to be plain simple from beginning, and his hidding a lot of advanced concept from the developers, which lead it to the current state of disaprobation through "enterprise level" language adopters.
Try to say"php" to a C#, vb.net or java dev. crowd and look at the disgusted faces...
It can be considerd as good, or bad, following the point of view.
I personally find it more good than bad. I learned with PHP, and ended with a syntax close to C even in that loosely typed world, just because I've it to be less prone to error.
It's a personnal effort, though, that nor many PHP developpers will make.
And I think that most advanced PHP dev will sooner or later tend to C# or Java, either by interest or by necessity. It's where the jobs are, simply put. At least here, in Europa.
The main difference I see, is that compiled programs (and in an extend, .Net and Java web apps), which will be instantiated by a virtual machine and stay in memory,
must have those kind of optimization available. Simply to limit the footprint it will have on the system. They are often designed to run until an exception or a particular signal telling them to shut down. PHP scripts, on the other hand are designed to die on a short notice, and if they don't it's the exception.
PHP don't thread process, it forks them. A notable difference:
http://gauss.ececs.uc.edu/Users/Fran...ads/forks.html
You can clone a process and detach it in the background, but some limitations that the engine put will stay. Not the limited run time (when you are in a console based PHP script, it's automatically set to infiny), but on the max memory size that the script can grow to.
This can bring to a severly imparied server, f you don't handle GC nor emergency exit correctly. Been there, done that and realised more realistically how desktop and web app yould be different...