|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-29 16:17 UTC] sean@php.net
[2006-07-29 19:30 UTC] kahennig at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 09:00:01 2025 UTC |
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.