Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: 'use strict' is not Perl

by mdillon (Priest)
on Aug 28, 2001 at 03:18 UTC ( #108309=note: print w/ replies, xml ) Need Help??


in reply to 'use strict' is not Perl

the PHP equivalent of 'use strict' (at least with respect to variable declaration) is setting the 'register_globals' configuration option to false. in PHP 4.1, the default for this setting in the distributed php.ini files will change from true to false. i don't know if the PHP community will adopt this recommendation, or continue on with potentially broken and insecure code.

also, using the E_NOTICE warning level will get error reporting similar to -w for Perl (variables used before they have an assigned value, potential precedence problems, etc.).


Comment on Re: 'use strict' is not Perl
Re: Re: 'use strict' is not Perl
by Anonymous Monk on May 10, 2002 at 14:58 UTC
    the PHP equivalent of 'use strict' (at least with respect to variable declaration) is setting the 'register_globals' configuration option to false.

    Great steaming hairy bollocks! All that does is stop variables that are passed by GET or POST from being declared as globals.

      EXACTLY, thus not polluting everything with variables from all over the damn place. The goal (strict) is the same, even though the web centric context of PHP is different.

      It's going to be hard for them to get out of their years of bad habits. Maybe PHP 5 will solve some of this, but I doubt it.

      ()-()
       \"/
        `                                                     
      

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://108309]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (19)
As of 2014-09-22 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls