Option Explicit? (On Dimming Variables...)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Google Mike

    #1

    Option Explicit? (On Dimming Variables...)

    Is there such a thing as ASP's Option Explicit in PHP, where I require
    variable declarations? This prevents typos and I find it useful at
    least for me.
  • Pedro

    #2
    Re: Option Explicit? (On Dimming Variables...)

    Google Mike wrote:[color=blue]
    > Is there such a thing as ASP's Option Explicit in PHP, where I require
    > variable declarations? This prevents typos and I find it useful at
    > least for me.[/color]

    Not exactly what you ask ... but

    setting error_reporting to E_ALL

    will be a good approximation.


    You can do that in php.ini (maybe httpd.conf) to affect all scripts,
    in a .htaccess to affect a whole directory,
    or in a instruction in a script to affect only that script.


    --
    I have a spam filter working.
    To mail me include "urkxvq" (with or without the quotes)
    in the subject line, or your mail will be ruthlessly discarded.

    Comment

    Working...