473,785 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python v PHP: fair comparison?

I don't know if this is a fair comparison or not. Any comments
appreciated.

- Python is more readable, and more general purpose
- PHP has awful backward compatibility
- PHP has a lower barrier to entry
- Most inexpensive web-hosters support PHP, but not Python
- PHP has far more pre-writen scripts available
- Newer versions of mod_python require Apache 2.0, which few hosters
have
- There is more demand for PHP developers, than Python developers

Nov 14 '06 #1
50 2644
walterbyrd wrote:
- PHP has a lower barrier to entry
Which kind of barrier do you mean -- syntax, availability, ...?

Also from what I know of PHP, language and API seem more unstable
and inhomogenous. CMIIW.

Regards,
Björn

--
BOFH excuse #219:

Recursivity. Call back if it happens again.

Nov 14 '06 #2
walterbyrd wrote:
I don't know if this is a fair comparison or not. Any comments
appreciated.

- Python is more readable, and more general purpose
- PHP has awful backward compatibility
- PHP has a lower barrier to entry
- Most inexpensive web-hosters support PHP, but not Python
- PHP has far more pre-writen scripts available
- Newer versions of mod_python require Apache 2.0, which few hosters
have
- There is more demand for PHP developers, than Python developers
For the most part you wouldn't ever thing about writing data
conversion programs, GUI applications, Windows services, COM+ objects,
Linux daemons, simple scripts, socket server/client applications,
etc. in PHP (but all can be done in Python). Web apps are just one of
the many applications that Python can tackle. PHP is normally
relegated to dynamic web page creation and database interfacing of
a web application. I've never seen it promoted as a language
that can be used to develop a standalone non-web browser based
application (but I'm sure someone will tell me that it can be used
that way ;-).

I agree that you can use PHP to do some basic Web apps more
quickly and with more general availability in PHP than Python.
I think there is a reason that Java and Python are used to power
the larger application frameworks that I see (e.g. WebSphere,
WebLogic, Zope, etc.).

I find many hosting companies that have mod_python now (this
wasn't the case a couple of years ago). Hosting costs have
dropped so much during that time that getting Python doesn't
cost much (if any) extra.

I'd be surprised if there was more demand for PHP developers
than Python developers. Google lists 51 PHP jobs and 168
Python jobs in their internal jobs database (I just did a
quick search).

-Larry
Nov 14 '06 #3
I'd be surprised if there was more demand for PHP developers
than Python developers. Google lists 51 PHP jobs and 168
Python jobs in their internal jobs database (I just did a
quick search).
Yes, but Google is the company that hired Guido, and that does most of
it's dev in python.

Looking at other companies yields different results:

Workopolis:
PHP 120
Python 36

Monster.ca:
PHP more than 1000
Python 976

Nov 14 '06 #4

- Python is more readable, and more general purpose
Yes, php is only for web.
On the other hand, Python is a general purpose language and it can be
used for nearly anything you may want to do.
- PHP has awful backward compatibility
Yes. And it's also an ugly language to work with.
- PHP has a lower barrier to entry
I don't think it is any easier than python. Not even to begin with.
- Most inexpensive web-hosters support PHP, but not Python
Sad but true.
- PHP has far more pre-writen scripts available
For web projects, perhaps.
But I'm sure you can do everything better with python, especially with
the new crop of web frameworks (Django, Turbo Gears, etc...).
- Newer versions of mod_python require Apache 2.0, which few hosters
have
You can also get alder versions of mod_python. What's the problem?
- There is more demand for PHP developers, than Python developers
So you want to be a web developer?
Then look no further. Learn python and go kick php developers asses in
the market place.
There are thousands of php developers out there. Do you want to be just
one more?
I'd rather learn something newer, and much more powerful.
And once you get a job, you will do everything better and faster than
the others, your quality will stand up from the rest and so your
reputation.
Then there will be more demand for "your skills".

Nov 15 '06 #5
On Tue, 2006-11-14 at 18:55 -0800, Luis M. González wrote:
>
- Python is more readable, and more general purpose

Yes, php is only for web.
Absolutely false. Most of my standalone, command-line scripts for
manipulating my unix users in LDAP are written in PHP, although we're
rewriting them in python.

Although I can't think of a single app written in php that's not web-
based (other than standalone scripts I have written), there are up-to-
date php bindings for GTK: http://gtk.php.net/

Michael

On the other hand, Python is a general purpose language and it can be
used for nearly anything you may want to do.
- PHP has awful backward compatibility

Yes. And it's also an ugly language to work with.
- PHP has a lower barrier to entry

I don't think it is any easier than python. Not even to begin with.
- Most inexpensive web-hosters support PHP, but not Python

Sad but true.
- PHP has far more pre-writen scripts available

For web projects, perhaps.
But I'm sure you can do everything better with python, especially with
the new crop of web frameworks (Django, Turbo Gears, etc...).
- Newer versions of mod_python require Apache 2.0, which few hosters
have

You can also get alder versions of mod_python. What's the problem?
- There is more demand for PHP developers, than Python developers

So you want to be a web developer?
Then look no further. Learn python and go kick php developers asses in
the market place.
There are thousands of php developers out there. Do you want to be just
one more?
I'd rather learn something newer, and much more powerful.
And once you get a job, you will do everything better and faster than
the others, your quality will stand up from the rest and so your
reputation.
Then there will be more demand for "your skills".
Nov 15 '06 #6
>Yes, php is only for web.
>
Absolutely false. Most of my standalone, command-line scripts for
manipulating my unix users in LDAP are written in PHP, although we're
rewriting them in python.

Although I can't think of a single app written in php that's not web-
based (other than standalone scripts I have written), there are up-to-
date php bindings for GTK: http://gtk.php.net/

Michael
Fair enough, this has been possible due to the enormous popularity of php.
You can also hit a nail with your shoe instead of using a hammer, and if you
try hard you may even succeed. You can also digg a a grave with a spoon
instead of a shovel, and after a couple of days you'll be finished.
You may be able to use php to create a stand alone app, but php was created
with the solely purpose of being a tool for creating dynamic web sites.
And you have to admit that using php for a non-web app is like trying to fit
a a square into a round hole.
Php is no more than a simplified C-ish language, dynamically typed with a
lot of functions aimed at web tasks. Without these built-in functions,
there's little you can do with it in your web apps.
On the otehr hand, you don't need a thousand built-in functions in python
for achieving every single task on a web site. You just write them, often
with just a couple of lines, because the language is that flexible an
consice.
You don't have to remember each and every function for every task, this is
ridiculuous.

I think that even as a general purpose language, python is still much more
adecuate, fast, fun and flexible than php for building web apps.

Luis

Nov 15 '06 #7
Olexandr Melnyk wrote:

PHP has a lower barrier to entry
I don't think so. Python has more intuitive syntax for beginners and is one of
the best choices for the first programming language to pick up.

I second this - before discovering Python (in a GSM module's guts) - I was being
steered in the direction of PHP by a friend - and I resisted, kicking and
screaming, as I found the syntax weird - I believe its not called Personal Home
Page for nothing...

- Hendrik

Nov 15 '06 #8
Luis M. González wrote:
the new crop of web frameworks (Django, Turbo Gears, etc...).
- Newer versions of mod_python require Apache 2.0, which few hosters
have

You can also get alder versions of mod_python. What's the problem?
The problem is that the system requirements for django and turbogears
are sky-high. I think Django requires Apache 2.0 (and maybe mod_python
3.x), and CherryPy (part of turbogears) requires Python 2.4. If you are
developing for a hosted environment, this can be a big problem. Few
enough hosters provide python to begin with, then add to that such
requirements as apache 2.0 - and you left with almost nothing.

Nov 15 '06 #9

Larry Bates wrote:
I'd be surprised if there was more demand for PHP developers
than Python developers.
Prepare to be surprised. From what I have seen demand for PHP
developers is off-the-scale higher than demand for Python developers.

If you search the job boards, then -IMO- it is only fair to not include
jobs where the language is listed as an also-ran. For example a typical
sys-admin job will list about 24 skills, and python is often thrown
into the landry list. To my way of thinking, that is not really an ad
for a python developer.

Trying to be as fair as I can be, my research shows that demand for
developers where PHP is the primary is *far* higher than jobs where
Python is the primary skills.

Of course, at best, that only shows the demand part of the equation.
There is also the supply side to consider. From what I have seen for
salary offers for PHP developers, it may be fair to say that PHP
developers are a dime a dozen.

Nov 15 '06 #10

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

Similar topics

699
34240
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
59
4307
by: Hugh Macdonald | last post by:
I've recently been trying out various different GUI frameworks in Python and was wondering if I could get your input on the pros and cons of the different ones... wxPython: I love the programming side of wxPython, but I find it's just so slow to initialise in the first place. Tkinter: While it's fast to load up, the syntax has never really appealed to me
114
9886
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
10
1885
by: walterbyrd | last post by:
I don't know if this is a fair comparison or not. Any comments appreciated. - Python is more readable, and more general purpose - PHP has awful backward compatibility - PHP has a lower barrier to entry - Most inexpensive web-hosters support PHP, but not Python - PHP has far more pre-writen scripts available - mod_python is difficult to set up, and use, and is buggy and prone to crash
0
1590
by: Paul Boddie | last post by:
QOTW: "I think you've got the wrong intuition about the balance between the amount of bandwidth and the amount of computation a given numer of dollars would buy. You've hundreds of CPU cycles available per bit transmitted; space enough to stick in even Python." - Thomas Womack (on comp.lang.lisp, earlier this year, so it's not a true QOTW) http://groups.google.com/group/comp.lang.lisp/msg/453239d7b8e0ef72 "I'm a recent, belated convert...
71
3356
by: Jack | last post by:
I understand that the standard Python distribution is considered the C-Python. Howerver, the current C-Python is really a combination of C and Python implementation. There are about 2000 Python files included in the Windows version of Python distribution. I'm not sure how much of the C-Python is implemented in C but I think the more modules implemented in C, the better performance and lower memory footprint it will get. I wonder if it's...
0
9647
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
9489
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
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
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...
1
7509
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
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.