whats the way of the running of php?[Please]

liunx

Guest
whats the difference between asp's running way and php's running way?

who can tell me ?thanx .....

between asp and php ,which language runs faster?

thanx for feed back!!!i just want to know~

i am sorry ,my english is poor~sorryIf you mean old-style ASP then there is very little difference between it and PHP. PHP perhaps has a slight edge on speed but it's never going to be something noticable in your average website.

ASP.NET on the other hand is a different kettle of fish, and not easily comparable to PHP. The .NET framework is aimed at the enterprise arena along with Java, whereas PHP still concentrates on the smaller stuff.

As for how they run, the both require a webserver. ASP.NET uses compiled bytecode whereas PHP is interpreted, which in theory would make ASP.NET faster.

As an interesting side note, PHP 5 has revamped COM support which allows access to the .NET class library, of course only on Windows.thanx for feed back!!



i remember some articles said that with the help of zend engine ,php can be first compiled ,and then when it has been requested , server will not compile php source code again and directly run it in memery~ is it right ????

in the book of my school, it says that the speed between asp and php is more or less the same,but java servlet 's speed is much higher, so ,i am mazing~~~~Originally posted by Shrike
PHP perhaps has a slight edge on speed but it's never going to be something noticable in your average website.


Or perhaps it doesn't. The only way to be sure is to write YOUR application twice and benchmark it. And nobody sane is going to do that.

PHP is not really terribly efficient, but in most cases where it is used, it doesn't matter. Anyway PHP accelerator products can increase its performance a lot.

PHP has shown to be very scalable. But scalability and straight-up efficiency are not the same thing.

MarkPHP (4, 5) is runtime compiled, not interpreted.

The Zend Accelerator is one of several tools that can be used to cache the compiled bytecode image.

<!-- m --><a class="postlink" href="http://www.google.com/search?&q=php%20accelerator">http://www.google.com/search?&q=php%20accelerator</a><!-- m -->

There is much nonsense floating around about the relative performance of various Web scripting languages. One important thing to keep in mind is that the functionality provided by PHP is coded in C, which is as close to the metal as you can get. A few lines of PHP might actually invoke libraries that originated as many thousands of lines of C.

Due to the way PHP is implemented in most installations, the underlying logic will be executed on the Web server. Whether that is good or bad depends on a lot of real issues and five times that many religious issues.Originally posted by yelvington
PHP (4, 5) is runtime compiled, not interpreted.
What's the difference between the two?It's a change in how the PHP engine handles the code.

With PHP 3, the processing was done one statement at a time, with the results immediately generated. That's pretty much how all simple scripting languages (such as bash, ksh, etc.) work.

With PHP4 and 5, the entire script is compiled to an intermediate format, then the intermediate format is executed by a virtual machine. It's the same method used by Perl. The advantage is performance, particularly in loops.

Because of this change, it's possible to cache the intermediate image, which is what the various accelerators do.

I saw a note the other day from a guy who had some code to take the intermediate image and convert it into a native executable (machine language) image, which would in essence make PHP a full compiled language. It's not a release-quality product but it's possible.Originally posted by yelvington
It's a change in how the PHP engine handles the code.

With PHP 3, the processing was done one statement at a time, with the results immediately generated. That's pretty much how all simple scripting languages (such as bash, ksh, etc.) work.

With PHP4 and 5, the entire script is compiled to an intermediate format, then the intermediate format is executed by a virtual machine. It's the same method used by Perl. The advantage is performance, particularly in loops.

Because of this change, it's possible to cache the intermediate image, which is what the various accelerators do.

I saw a note the other day from a guy who had some code to take the intermediate image and convert it into a native executable (machine language) image, which would in essence make PHP a full compiled language. It's not a release-quality product but it's possible.


OH,my dear brother ,thank you very much!!!!!!!!!!!thank you !!!
 
Back
Top