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.



Relevant Pages

  • Re: What are the differences between Perl and PHP when handling with Web pages
    ... What are the differences between Perl and PHP? ... anyway for the sake of good programming practice. ... I end up using PHP more for web development than PHP. ...
  • Re: Can a Perl Programmer Pick up PHP quickly?
    ... PHP is not easier compared to Perl. ... a language with fewer features is going to be easier to ... You can't call documentation guessed after the source not good ...
  • Re: Face lift survey
    ... But PHP, I think, integrates html code a better way. ... you still have to do a perl script and then put ... Perl CGI programming! ...
  • Re: Coverting perl to php
    ... I am bout ready to convert it to php but wonder if there are ... but there's nothing to match a good perl person porting their ... The reason for the rewrite is because a large chunk of the ancilary ... code to talk to the database, recreating what they did, and having 2 ...
  • RE: What are the differences between Perl and PHP when handling with Web pages
    ... I think perl can be used for more applications than PHP. ... You don't really need scripting to build a web site. ... there are people programming in PHP and perl. ...