[kw-pm] why the hatred for PHP?

Andrew Kohlsmith akohlsmith-pm at benshaw.com
Wed Jun 23 12:58:51 CDT 2004


On Wednesday 23 June 2004 13:40, Marko Vidberg wrote:
> I coded in Perl for a number of years at my work for all our web projects,
> then we switched everything to PHP and I like it much better.  I will
> still use Perl for my quick and dirty command line scripting but for web
> development how can you beat PHP?

Web development?  As in web pages?  Dreamweaver or Quanta (latter I use for 
editing) -- Use decent comments to allow programmatic splitting of the 
elements you need.

After that I try to split up the HTML elements into blocks I can store 
somewhere as "raw" as possible, and then write functions to utilize them 
(filling tables, etc.) -- I use the comments so I can programattically split 
the elements up so that (for example) I can rebuild the original HTML page, 
edit it, and split it up again to make changes as necessary.

Yes you can do the same with PHP but then comes my second gripe:  PHP and Perl 
are very similar in function.  Why learn and try to master two very similar 
languages?  I chose Perl since it was much more widespread and (to me) far 
more powerful, both in OO and in text parsing, which is what I end up using 
scripting for most times.  First comes the grep/cut/sed and if it gets 
unwieldy I break out the depeleted uranium Perlbar.  :-)

My hatred for PHP comes from my experiences with it.  As I said in an earlier 
post, it definitely can separate content from presentation but everything 
about PHP seems geared to encouraging mixing the two.  And when you do that, 
you get Pain.

With APIs such as PEAR and ADODB the database abstraction is better but it 
still is kind of sucky compared to DBI.  Perl seems to be able to nestle up 
to the hardware (fast I/O) better than PHP as well, but most importantly, 
Perl's CPAN and modular architecture are MILES ahead of PHP.  Nay, 
light-years ahead.  There is no substitute for me.

<small voice>However, with this Exchange4Linux thing taking off here I am 
learning Python...  it seems to be a dominatrixed version of Perl...</small 
voice>

-A.



More information about the kw-pm mailing list