What are your views?

PHP isn't Perl.

For Perl programmers, its apparent similarities to Perl tend to be more frustrating than helpful because they are only cosmetic similarities. Under the hood, the languages are very different from each other.

The example you give is usually the first that Perlers faced with learning PHP run into. It is also usually the first to be forgotten once familiarity starts to settle in. One that I banged my head on for a while was that Perl's concept of context doesn't translate into PHP. For instance, I had a PHP function defined to take multiple arguments and then spent far too long trying to figure out why I couldn't shove all those arguments into an array and call myfunc($array)... duh.

I think most experienced Perl programmers who are introduced to PHP for the first time tend to view PHP as an inferior if not downright dysfunctional Perl¹. It isn't. It's actually a decent language, designed primarily for a limited domain, that meets its requirements fairly well. But, PHP isn't Perl. If you keep that in mind while you learn it, you might have an easier time of it.

1. Well, I did anyway.

-sauoq
"My two cents aren't worth a dime.";

In reply to Re: Perl is more intuitive by sauoq
in thread Perl is more intuitive by kiat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.