php-initialized

From: Date: Tue, 16 Sep 2008 12:31:09 +0000
Subject: php-initialized
Groups: php.internals 
Request: Send a blank email to internals+get-40531@lists.php.net to get a copy of this message
Hello! PHP allows to work with uninitialized variables. E_NOTICE error level can be used to warn before it but this is not perfect for two reasons: 1. E_NOTICE doesn't warn before adding elements to uninitialized arrays. It is further explained by Etienne Kneuss: http://www.colder.ch/news/09-09-2005/4/another-example-showing-t.html 2. E_NOTICE is emitted in a run-time and not in a compile-time which can be late (the error is spotted in the same time as abused). To solve both problems, I've developed a program checking the usage of uninitialized variables from outside the script without running it: http://code.google.com/p/php-initialized/ Maybe the same concept can be used in the PHP compile-time. Jakub Vrana

« previous php.internals (#40531) next »