#23168 [NEW]: Variables can be instantiated by first use
| From: | sascha dot wildgrube at steganos dot com | Date: | Fri, 11 Apr 2003 14:37:38 +0000 |
| Subject: | #23168 [NEW]: Variables can be instantiated by first use | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-37567@lists.php.net to get a copy of this message | ||
From: sascha dot wildgrube at steganos dot com
Operating system: any
PHP version: 4.3.1
PHP Bug Type: Feature/Change Request
Bug description: Variables can be instantiated by first use
This is not really a bug. It is a behaviour by design that has troubled php
developers for years: The
variable-can-be-instantiated-by-first-use-Effect!
Just look at that:
for ($nIndex=0; $nIndex < 23; $nIndx++)
{
whatever();
}
Most compilers will produce an error like "what the hell is nIndx? Not
php. php will produce an endless loop. That is weak! And it is still the
number one time eater when programming php. Change that and php as a tool
can virtually DOUBLE efficiency! Make the need of variable initialization
an option so that the community is not pissed off and existing sources are
not rendered useless but for god's sake add it for future use. PLEASE,
PLEASE, PLEASE WITH SUGAR, PLEASE WITH SUGAR AND CREAM!!!!
Thanks!
--
Edit bug report at http://bugs.php.net/?id=23168&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23168&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23168&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23168&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23168&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23168&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23168&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23168&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23168&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23168&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23168&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23168&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23168&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23168&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23168&r=gnused