#38247 [NEW]: include('foo') or include 'foo' -> documentation inconsistency

From: Date: Fri, 28 Jul 2006 21:13:51 +0000
Subject: #38247 [NEW]: include('foo') or include 'foo' -> documentation inconsistency
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969373612@lists.php.net to get a copy of this message
From: kahennig at gmail dot com Operating system: Irrelevant PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: include('foo') or include 'foo' -> documentation inconsistency Description: ------------ In the Code Samples found in the documentation, pages for "include", "require", "include_once" and "require_once" these statements are sometimes used with parentheses e.g: include_once("a.php"); and sometimes without them e.g: require 'prepend.php'; It seems to me that if both are valid, this should be noted in the doc for each of these statements. Else, if the PEAR Coding Standards are right (see http://pear.php.net/manual/en/standards.including.php) and parentheses should not be used, then it might make sense to fix the examples and add a Note informing of the "correct" way to use these statements. I am well aware, that both ways work, but what is the "right" or "prefered" way? Is one deprecated in favor of the other? It might also be a good idea to include the answeres to these questions in the doc. Also, in the doc these statements are refered to as "include()", "require()", etc. Where they always have the parentheses after them. This seems quite confusing, if they really are not Functions but Statemens (as the Doc. says: "The include() STATEMENT includes and evaluates the specified file." -emphasis mine) It might also be worth eliminating the parentheses in the statement name from the Documentation. -- Edit bug report at http://bugs.php.net/?id=38247&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38247&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38247&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38247&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38247&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38247&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38247&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38247&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38247&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38247&r=support Expected behavior: http://bugs.php.net/fix.php?id=38247&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38247&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38247&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38247&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38247&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38247&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38247&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38247&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38247&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38247&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38247&r=mysqlcfg

« previous php.doc (#969373612) next »