I've written what I hope to be a fairly objective comparison of Perl and PHP in Re: Preaching Perl gospel to PHP converts.... But further to that here's a simple list of the various differences between the two languages

Perl PHP
Language features
Lexical scoping and dynamic scoping Functions have unique scopes
3 different contexts (scalar, list, void) No context types
5 different sigils - $,@,%,&,* One sigil - $
Regular expressions part of the language Regular expressions accessable through functions
Data
Scalars, Arrays, Hashes Scalars, Arrays/Hash duality
Type-ignorant with roughly 3 types (string, number, reference) Type-ignorant with roughly 13 different types (see. is_ functions)
Explicit references Optional explicit references
Pass by value Implicit (i.e it should do the right thing)
Functions
Can be called with 3 different syntaxes Called with one syntax
Anonymous functions part of the language Anonymous functions from create_function
Can be referenced Symbolic calls
Args implicitly aliased to @_ Named args
Objects
Created through blessing a reference Created through new Class
Multiple Inheiritance Single Inheritance
Class variables aren't standard Class variables part of the language

This is by no means exhaustive or entirely accurate but should give you some ideas of the fundamental differences between the two languages.
HTH

_________
broquaint


In reply to Re: Re: Re: php + Smarty looks like CGI by broquaint
in thread php + Smarty looks like CGI by Anonymous Monk

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.