473,654 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advantages and disadvantages of PHP?

I'm a programmer learning PHP. I'm looking for some input on its
strong and weak points compared to other server-side programming
environments, e.g., Java Server Pages.

Please note, this is not a religious question. Programming languages
are tools to me. I just want information about where different types
of solutions are likely to be optimal.
Feb 17 '08 #1
21 14635
"Jonathan Sachs" <js******@sbcgl obal.netwrote in message
news:dr******** *************** *********@4ax.c om...
I'm a programmer learning PHP. I'm looking for some input on its
strong and weak points compared to other server-side programming
environments, e.g., Java Server Pages.

Please note, this is not a religious question. Programming languages
are tools to me. I just want information about where different types
of solutions are likely to be optimal.
Take your pick: PHP, ASP, ASP.NET, Perl, Python, Java, et.al.

What does your Web server support? What languages do you know?

The answer usually boils down to the above.

What Every Webmaster Should Know: PHP, Perl, ASP.net
http://www.seroundtable.com/archives/006709.html
Feb 17 '08 #2
McKirahan wrote:
"Jonathan Sachs" <js******@sbcgl obal.netwrote in message
news:dr******** *************** *********@4ax.c om...
>I'm a programmer learning PHP. I'm looking for some input on its
strong and weak points compared to other server-side programming
environments , e.g., Java Server Pages.

Please note, this is not a religious question. Programming languages
are tools to me. I just want information about where different types
of solutions are likely to be optimal.

Take your pick: PHP, ASP, ASP.NET, Perl, Python, Java, et.al.

What does your Web server support? What languages do you know?

The answer usually boils down to the above.

What Every Webmaster Should Know: PHP, Perl, ASP.net
http://www.seroundtable.com/archives/006709.html

And as usual, what fits your style and the application is better than
what is the Best Thing..
Coming from C I found PHP mainly good, but irritating because of weak
typing and inconsistency of syntax..this isn't a fault per se, just
something you have to be equally careful of as you do in wobbly if you
do operations on different types. In PHP they are invisibly converted
with sometimes unexpected results.

Its more than good enough for what I want tho..
Feb 17 '08 #3
On Sun, 17 Feb 2008 07:38:50 -0600, Jonathan Sachs
<js******@sbcgl obal.netwrote:
>I'm a programmer learning PHP. I'm looking for some input on its
strong and weak points compared to other server-side programming
environments , e.g., Java Server Pages.
First, are you totally free to choose a language, or are there some
constraint somewhere that would narrow things down? For instance, if
you'll host your app on a shared server, just about every hoster
offers PHP, while other languages are much more rare.

If you'll be using your own server, you'll have to check if the app
has any dependency, in which case you'll have to check if those
externalities can be called from the language.

Finally, what language do you already know? In terms of productivity,
Python is probably the best, because it's very rich while offering a
very simple syntax, while PHP is much more common simply because it's
been offered by hosters for about ten years now.

The web is pretty restrictive in what you can do compared to desktop
apps anyway, because of the nature of HTTP and HTML, so ultimately,it
doesn't make much of a difference what language you choose on the
server. You can probably even write most of it in JavaScript and call
routines from the client through AJAX :-)
Feb 17 '08 #4
On Feb 17, 3:38 pm, Jonathan Sachs <js070...@sbcgl obal.netwrote:
I'm a programmer learning PHP. I'm looking for some input on its
strong and weak points compared to other server-side programming
environments, e.g., Java Server Pages.

Please note, this is not a religious question. Programming languages
are tools to me. I just want information about where different types
of solutions are likely to be optimal.
As you asked for optimization, here is a list that i made, considering
investment & operational cost, and time saving features, etc. Ofcourse
i suggest open source, big companies like yahoo, google, nasa,
youtube, facebook,etc. use;

1-Python
2-PHP
3-Perl
4-Java
Feb 17 '08 #5
On Sun, 17 Feb 2008 16:23:34 GMT, Jonathan Sachs
<js******@sbcgl obal.netwrote:
>I'll repeat that I'm guessing here. My guess is based on the fact
that PHP is (as far as I know) an interpreted language, while Java is
a JIT compiled language.
Does someone have data on whether JIT-compiled Java is faster than
cached PHP opcode?
>The fact that Java and C# are strongly typed languages may also have
an effect on the scalability of applications, as well as their
robustness and maintainability .
That's a good reason.
Feb 17 '08 #6
Jonathan Sachs wrote:
>

Speaking technically, it seems to me that PHP is likely to be a poor
choice for large-scale services where hundreds or thousands of users
will be hitting the web site at the same time. I'm guessing, though,
and I wouldn't know how to judge how large is too large. Perhaps
there are other areas where PHP is particularly weak or strong, which
I do not yet know enough to wonder about. Hence, my question.
The current trend eems to be to throw processor power and RAM at such sites.

If you have such, you probably would also have an Oracle Database
underneath, not MySql :-)

I picked PHP because I wanted fast prototyping of sonething running on a
cheap platform, for moderate traffic only.

Its actually pretty good. I am more bandwidth limited than processor
bound, and probably RAM would be the first thing I would add.

There is no doubt that writing in C would be immensely more efficient
than an interpreter, but then you have the usual compile/link/install to
do every time you make a change.

However there is no reason why you could not pretty much recode any time
critical bits into 'C'..r write a whole PHP library in 'C' that did your
clever bits.*

In the end execution efficiency is almost never a dominant issue..with
PHP, MYSQL and Apache, especially on a Linux OS, you have an ideal
platform that costs next to nothing to develop applications. A thousand
concurrent users hitting it would probably cripple it sure, but by then
you should have the money and the reason to migrate to something top
end, if that's what's needed.

I would regard the above as the de-facto standards for small to medium
website development.

*Where does one find out how to do this? I might need to one day...
Feb 17 '08 #7
Gilles Ganault wrote:
On Sun, 17 Feb 2008 16:23:34 GMT, Jonathan Sachs
<js******@sbcgl obal.netwrote:
>I'll repeat that I'm guessing here. My guess is based on the fact
that PHP is (as far as I know) an interpreted language, while Java is
a JIT compiled language.

Does someone have data on whether JIT-compiled Java is faster than
cached PHP opcode?
>The fact that Java and C# are strongly typed languages may also have
an effect on the scalability of applications, as well as their
robustness and maintainability .

That's a good reason.
As is the difficulty of ripping off the source if for some reason the
3rd party server suddenly delivers pages of PHP source to you ;-)

It happens..
Feb 17 '08 #8
On Sun, 17 Feb 2008 14:16:25 -0500, Jerry Stuckle
<js*******@attg lobal.netwrote:
>You will find that often java is slower than PHP.

Don't guess. Get the facts.
Can you refer me to a source of information on this, or at least
explain why it is so?

I value facts, but I do not have the ability to pull them out of thin
air. The value of USENET lies in the ability of like-minded people to
share information, so that each person does not have to reinvent or
rediscover the wheel for him or herself. Please share a little.
Feb 17 '08 #9
Jonathan Sachs wrote:
<snip>
>
Speaking technically, it seems to me that PHP is likely to be a poor
choice for large-scale services where hundreds or thousands of users
will be hitting the web site at the same time. I'm guessing, though,
and I wouldn't know how to judge how large is too large. Perhaps
there are other areas where PHP is particularly weak or strong, which
I do not yet know enough to wonder about. Hence, my question.
I am not sure about the back-end, but at the front end, Facebook uses
Php and JS. Signing in takes you to the page below. Facebook's
popularity can be judged at Alexa.

http://www.facebook.com/home.php?

http://www.alexa.com/data/details/tr...s/facebook.com
Feb 17 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3934
by: Husam | last post by:
Hi EveryBody: I have research about advantages and disadvantages of C++ languages In one of my programming courses. Can Any one help me and told me about advantages and disadvantages of C++ or redirect me to some web sites proffessinal about this kind of reserach ? any help will be appreciated
4
2434
by: IchBin | last post by:
What are the advantages or disadvantages of .inc files over the 'include' statement. I can't seem to find that information at the PHP website. Also the same for form building inline, I guess you would call it, and HTML template objects. File types of .tpl and .ihtml? Thanks in Advance... IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us __________________________________________________________________________
1
9159
by: vumani | last post by:
what is the advantages and disadvantages of Ms SQL server and java servletts front-end on the clien end. what is the advantages and disadvantages of Ms Access on the server, connected via JDBC and java on the client end. what is the advantages and disadvantages of HTML on the client end,coupled with SQL server and ODBL on the server end.
1
8736
by: vibee | last post by:
what are the advantages and disadvantages of normalization, and if i alread have a single talbe with a single form, is it too late to normalize thanks
8
3222
hsn
by: hsn | last post by:
i would like to know what are the security advantages and disadvantages in HTML thank you
1
3469
by: bantunks | last post by:
Hello, I am trying to figure out the advantages and disadvantages of exposing interfaces through Opaque data types in C. I have figured/found out the following two advantages 1. Higher level of abstraction 2. if the layout of the defined structure inside the source files changes, it will reduce/limit/minimize the amount of changes that may be needed in the code of the application that uses the library i.e. the library will itself handle...
3
2383
by: Damodhar | last post by:
what is the advantages and disadvantages for register_globals = on
0
8375
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8593
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.