#45207 [NEW]: Incorrect or missing documentation

From: Date: Sun, 08 Jun 2008 12:13:23 +0000
Subject: #45207 [NEW]: Incorrect or missing documentation
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-873@lists.php.net to get a copy of this message
From: chrisvroberts at gmail dot com Operating system: n/a PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Incorrect or missing documentation Description: ------------ On "http://www.php.net/manual/en/language.variables.php", it says: "It is not necessary to initialize variables in PHP however it is a very good practice. Uninitialized variables have a default value of their type - FALSE, zero, empty string or an empty array." However, I was unable to find in the documentation how to define a variable and specify it's type without assigning a value to it. When a variable is declared and not initialized, which of the values described above would the variable take. If it is used in a context which specifies say boolean, then value would be FALSE but if it is used in an overloaded context, which value would it take and is there a precedence? Is this implementaitn rather than language specific? If it is possible to specify a variables type without assigning to it, perhaps this should be described in the documentation in order to put the above quote into context? -- Edit bug report at http://bugs.php.net/?id=45207&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45207&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45207&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45207&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45207&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45207&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45207&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45207&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45207&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45207&r=support Expected behavior: http://bugs.php.net/fix.php?id=45207&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45207&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45207&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45207&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45207&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45207&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45207&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45207&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45207&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45207&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45207&r=mysqlcfg

« previous php.doc.bugs (#873) next »