php vs python

Duncan Booth duncan.booth at invalid.invalid
Fri May 23 08:18:43 EDT 2008


Erwin Moller 
<Since_humans_read_this_I_am_spammed_too_much at spamyourself.com> wrote:

> Why do you say it 'tastes less' then Python?
> I don't want to start a religious war, but am curious.
> Who knows, maybe  I'll dump PHP and start using Python after your 
> answer. ;-)

I may not be a good person to answer this since I don't know PHP: I don't 
have any religious objection to it, but I just never found it intuitive in 
the way I found Python fits my mindset.

On those rare occasions when I've helped someone who wanted advice I've 
found that my Python oriented viewpoint can be quite hard to translate to 
PHP. For example I'd suggest 'oh you just encode that as utf8' only to be 
told that there's no easy way to do that (have just Google'd it looks like 
there is now a way to do that but with a big red warning about it being 
EXPERIMENTAL and only use at your own risk).

(Looking at the example given for unicode_encode it appears to depend for 
its working on a global setting which isn't included in the example. I may 
have misunderstood the example but if I read that correctly its a good 
example of why PHP doesn't fit my brain.)

Anyway Google should find you plenty of articles comparing the languages. 
I'd say you use whichever feels right to you. I would also suggest you 
should try Python at least a bit (but since I don't intend to do the same 
for PHP you may not count my advice for much).

I found these pretty quickly:

http://python.about.com/od/gettingstarted/ss/whatispython_4.htm
http://wiki.w4py.org/python-vs-php.html


-- 
Duncan Booth http://kupuguy.blogspot.com



More information about the Python-list mailing list