Re: [PHP4BETA] request: "strict" syntax?

From: Date: Sat, 01 Jan 2000 22:36:19 +0000
Subject: Re: [PHP4BETA] request: "strict" syntax?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-8776@lists.php.net to get a copy of this message
At 00:30 02/01/2000 , Dan wrote:
I have spent hours to finally arrive at my bug - a typo. Since PHP does not care if a variable has been defined, it goes merrily on its way returning me null values and creating wonderful new side effects.
PHP actually cares about that very much. To allow for downwards compatibility with PHP/FI 2.0, PHP 3.0 (and 4.0) don't warn you about this by default.
Perl has a "strict" mode - could we please, please have the same in PHP? I have lost many hours hunting problems the parser could have pointed out in seconds.
You can simply turn on notices in your php.ini file or in the beginning of your script: error_reporting(error_reporting()|E_NOTICE); Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.version4 (#8776) next »