Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: Perl and PHP

by Anonymous Monk
on Dec 11, 2012 at 14:34 UTC ( #1008313=note: print w/replies, xml ) Need Help??

in reply to Re: Perl and PHP
in thread Perl and PHP

PHP's advantage is its disadvantage: it's a great big wad. Everybody's got the same wad. You can't add anything to it with modules; everything is compiled-in. But everyone's got the same wad ... oops! ... until a new PHP version comes along and changes the language. And heaven help you if you add a single unwanted space before or after the bracket tags. Bleah.

Replies are listed 'Best First'.
Re^3: Perl and PHP
by tobyink (Abbot) on Dec 11, 2012 at 15:02 UTC

    Actually there's plenty of modules for PHP; many of them are distributed as part of the PHP core. For example, the cURL extension. Compile PHP with the --with-curl option and you get cURL; otherwise you don't.

    The difference is that PHP extensions tend to vomit their entire API into the global namespace.

    The embedded Perl interpreter for PHP I mentioned earlier is a compiled PHP extension module. It happens to be one that is not bundled with PHP itself, and also a rare example of an object-oriented one, which manages to avoid polluting the global namespace much.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008313]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-06-19 18:37 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.