Home > Archive > PHP Language > April 2005 > PHP vs. Python for the web
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
PHP vs. Python for the web
|
|
| Unknown User 2005-04-15, 3:56 am |
| I am a Python programmer and I'm thinking about learning PHP, which is
similar to C++ (quite different from Python). I want to start writing web
applications. Do you think if I learn PHP I'll develop faster? Does PHP
have more features? How about the speed of execution? What are the pros
and cons? Our server can run both Python, Perl and PHP, so I have the
choice.
Thanks for your opinion,
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
| |
| Michael Vilain 2005-04-15, 8:55 am |
| In article <op.so848scor3xrds@sony>, "Unknown User" <me@privacy.net>
wrote:
> I am a Python programmer and I'm thinking about learning PHP, which is
> similar to C++ (quite different from Python). I want to start writing web
> applications. Do you think if I learn PHP I'll develop faster? Does PHP
> have more features? How about the speed of execution? What are the pros
> and cons? Our server can run both Python, Perl and PHP, so I have the
> choice.
> Thanks for your opinion,
You're more likely to find a shared ISP that offers PHP than Python.
Which means that web sites will be cheaper to run if they're developed
with PHP in a shared environment than in Python on a dedicated or
co-located server.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
| |
| Colin McKinnon 2005-04-15, 3:56 pm |
| Unknown User wrote:
> I am a Python programmer and I'm thinking about learning PHP, which is
> similar to C++ (quite different from Python).
....no not really - both use curly braces to delimit blocks but that's about
it.
> I want to start writing web
> applications. Do you think if I learn PHP I'll develop faster? Does PHP
> have more features? How about the speed of execution? What are the pros
> and cons? Our server can run both Python, Perl and PHP, so I have the
> choice.
I'm well known as a Perl detractor. Python is more than capable, and ZOPE
provides a wonderful framewotk for developing web applications....but
there's an awful lot more PHP web programming going on out there than
anything else.
HTH
C.
| |
| James Pittman 2005-04-15, 3:56 pm |
| Colin McKinnon wrote:
> Unknown User wrote:
>
>
>
>
> ...no not really - both use curly braces to delimit blocks but that's about
> it.
Yeah - PHP is more similar to C than C++. It clones a lot of the string
functions (strstr, strchr, etc.) that C has.
Jamie
| |
| Oli Filth 2005-04-15, 3:56 pm |
| James Pittman wrote:
> Colin McKinnon wrote:
>
>
> Yeah - PHP is more similar to C than C++. It clones a lot of the string
> functions (strstr, strchr, etc.) that C has.
>
It's not that similar to either C or C++. PHP doesn't have pointers,
explicitly typed variables, explicit return types, a compiler to pick up
syntax errors, or memory allocation issues, to name but a few major
differences.
PHP is a managed language, C++ isn't (i.e. if you create an object *you*
are responsible for deleting it, this concept doesn't exist in PHP). And
using arrays in C++ is nothing like using arrays in PHP.
So yes, a page of PHP code may look superficially similar to a page of
C/C++ code (especially since a lot of the function names are the same,
as you say), but using it to do something in the real world is a
*completely* different experience to using C/C++.
--
Oli
| |
| Andy Hassall 2005-04-15, 8:56 pm |
| On Fri, 15 Apr 2005 08:09:06 -0400, James Pittman <jpittman1@yahoo.com> wrote:
>Colin McKinnon wrote:
>
>Yeah - PHP is more similar to C than C++.
Yes, but...
>It clones a lot of the string
>functions (strstr, strchr, etc.) that C has.
C++ has strstr as well - C++ has all the standard library functions that C
has. strstr is declared in <string.h> for C, so in C++ it's officially in
<cstring> - equivalents exist for all the basic C functions; C++ is very close
to an exact superset of C. (Which doesn't mean that writing C in C++ is right,
it's just possible)
PHP 5's improved the OO support considerably, but it leans more towards Java
than C++.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
| |
| Unknown User 2005-04-16, 3:56 pm |
| Thank you guys. It would be actually to develop for a dedicated server
that we have. I think I'll give both a try. It's going to be interesting
to have 2 languages at hand.
On Fri, 15 Apr 2005 09:02:44 -0300, Colin McKinnon
<colin.deletethis@andthis.mms3.com> wrote:
> Unknown User wrote:
>
>
> ...no not really - both use curly braces to delimit blocks but that's
> about
> it.
>
>
> I'm well known as a Perl detractor. Python is more than capable, and ZOPE
> provides a wonderful framewotk for developing web applications....but
> there's an awful lot more PHP web programming going on out there than
> anything else.
>
> HTH
>
> C.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
|
|