Re: Can a Perl Programmer Pick up PHP quickly?

On Fri, 02 Sep 2005 19:51:13 +0200, Matija Papec wrote:

> It is, but you can soon find struggling with php if you want to do something
> more =>

Ah, another PHP hater, and a countryman at that. No, no struggling is
necessary. PHP is easier to learn then perl. Much easier to learn. On the
other hand, for the CLI environment, perl rulz. I started with perl few
weeks ago, when subroutines were called with "&" and curent version was
perl 4.0.36. As an oracle DBA, I used oraperl variety, a predecessor to
DBI/DBD::Oracle. It was 1995. PHP5 was a breeze to pick: no @ISA, no
$AUTOLOAD, no tie, no hidden first arguments, just classes, methods and
inheritance, the way they're meant to be. Yes, PHP5 uses functions for
everything and you can't write something like

if (/^Gas:(\d+).*Mileage:(\d+).*Toll:(\d+)/) { my $expense=$1+$2+$3; }

or use tricky idioms like

$a ||= 'A';

PHP functions are, on the other hand, well documented, books are complete,
unlike "Learning Perl", which skips things like references, packages and
objects. To learn Perl, you need at least 3 books: "Learning Perl",
"Programming Perl" and Conway's OO Perl. It is much easier to learn PHP
then to learn Perl. On the other hands, Perl has formats, and PHP has
nothing like a built-in report writer. I love both Perl and PHP, PHP for
the web, Perl for CLI. Perl with its arcane secrets and tricks that can be
learned only through the word of mouth and bizarre mechanisms like "tie"
is much, much harder to learn. This comes from someone who uses both perl
and PHP. That page is rubbish. For the real PHP hater page look for the
PHP emulation modules on CPAN.