To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Upgrading PHP

Upgrading PHP Issues concerning PHP version upgrades and future releases

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-06-2004, 04:03 PM   #1
nuying117
Junior Member
 
nuying117's Avatar
 
Join Date: Feb 2004
Location: Hangzhou,China
Posts: 22
[Resolved]whats the way of the running of php?[Please]

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~sorry
__________________
http://www.x117.net

Last edited by nuying117; 08-09-2004 at 06:16 AM.
nuying117 is offline   Reply With Quote
Old 08-06-2004, 04:13 PM   #2
Shrike
Not Yet Involved
 
Shrike's Avatar
 
Join Date: Oct 2003
Location: The Eighth, Sursamen
Posts: 2,254
If 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.
__________________
The Hundredth Idiot
Shrike is offline   Reply With Quote
Old 08-06-2004, 04:22 PM   #3
nuying117
Junior Member
 
nuying117's Avatar
 
Join Date: Feb 2004
Location: Hangzhou,China
Posts: 22
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~~~~
__________________
http://www.x117.net
nuying117 is offline   Reply With Quote
Old 08-06-2004, 05:17 PM   #4
MarkR
Senior Member
 
Join Date: Jul 2004
Location: Oxford, England
Posts: 1,983
Quote:
Originally posted by Shrike
[b]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.

Mark
MarkR is offline   Reply With Quote
Old 08-07-2004, 11:40 AM   #5
yelvington
Senior Member
 
Join Date: Dec 2000
Location: USA
Posts: 1,012
PHP (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.

http://www.google.com/search?&q=php%20accelerator

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.
yelvington is offline   Reply With Quote
Old 08-07-2004, 01:28 PM   #6
Shrike
Not Yet Involved
 
Shrike's Avatar
 
Join Date: Oct 2003
Location: The Eighth, Sursamen
Posts: 2,254
Quote:
Originally posted by yelvington
PHP (4, 5) is runtime compiled, not interpreted.
What's the difference between the two?
__________________
The Hundredth Idiot
Shrike is offline   Reply With Quote
Old 08-07-2004, 01:46 PM   #7
yelvington
Senior Member
 
Join Date: Dec 2000
Location: USA
Posts: 1,012
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.
yelvington is offline   Reply With Quote
Old 08-07-2004, 03:50 PM   #8
nuying117
Junior Member
 
nuying117's Avatar
 
Join Date: Feb 2004
Location: Hangzhou,China
Posts: 22
Quote:
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 !!!
__________________
http://www.x117.net
nuying117 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:02 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.