rfc:source_files_without_opening_tag
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:source_files_without_opening_tag [2012/04/10 23:45] – [Why is this desirable?] boutell | rfc:source_files_without_opening_tag [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== ABANDONED ====== | ||
+ | |||
+ | I have abandoned this proposal. I have come to feel it changes the spirit of PHP too much, offering too little gain for the degree of unhappiness it inspires and the potential for confusion it creates. I am leaving it here for historical purposes. -Tom Boutell | ||
+ | |||
====== Request for Comments: Source Files Without Opening Tag ====== | ====== Request for Comments: Source Files Without Opening Tag ====== | ||
- | * Version: 1.1 | + | * Version: |
- | * Date: 2012-04-10 | + | * Date: 2012-04-16 |
* Author: Thomas Boutell < | * Author: Thomas Boutell < | ||
* Status: Under Discussion | * Status: Under Discussion | ||
Line 32: | Line 36: | ||
=== Part 1: Enhance the include, include_once, | === Part 1: Enhance the include, include_once, | ||
- | These keywords will be enhanced with a second, optional parameter. | + | These keywords will be enhanced with a second, optional parameter |
The first parameter (the URL/ | The first parameter (the URL/ | ||
Line 54: | Line 58: | ||
| | ||
// Load filename.phpp. This file must consist purely of source code, no <?php or ?> tokens needed or permitted | // Load filename.phpp. This file must consist purely of source code, no <?php or ?> tokens needed or permitted | ||
- | require ' | + | require ' |
// Behaves just like include_once | // Behaves just like include_once | ||
- | include ' | + | include ' |
// Behaves just like require | // Behaves just like require | ||
- | include ' | + | include ' |
// Combine them all: includes only once, with a fatal error on failure, parsing in "code mode" | // Combine them all: includes only once, with a fatal error on failure, parsing in "code mode" | ||
- | include ' | + | include ' |
// Exactly the same as previous example | // Exactly the same as previous example | ||
- | require_once ' | + | require_once ' |
| | ||
=== Part 2: Filename Convention === | === Part 2: Filename Convention === | ||
Line 113: | Line 117: | ||
Bitwise flags are faster and also provide built-in error checking: use of a constant not defined by a particular version of PHP will generate a notice. Require statements are something PHP executes quite often, so generating unnecessary arrays and testing array values is an unnecessary performance hit. | Bitwise flags are faster and also provide built-in error checking: use of a constant not defined by a particular version of PHP will generate a notice. Require statements are something PHP executes quite often, so generating unnecessary arrays and testing array values is an unnecessary performance hit. | ||
- | ===== Changelog ===== | + | **"Why is the AS keyword necessary? Why not a comma?" |
- | * 2011-04-09 Yasuo Ohgaki: Added related RFC. | + | Since these keywords are language constructs, not functions, |
- | * 2011-04-10 Thomas Boutell: removed misleading word " | + | |
- | * 2011-04-10 Thomas Boutell: version 1.1. Replaced | + | ===== Changelog ===== |
+ | * 2012-05-06 Thomas Boutell: formally abandoned by original proponent. | ||
+ | * 2012-04-09 Yasuo Ohgaki: Added related RFC. | ||
+ | * 2012-04-10 Thomas Boutell: removed misleading word " | ||
+ | * 2012-04-10 Thomas Boutell: version 1.1. Replaced '' | ||
+ | * 2012-04-16 Thomas Boutell: added Nikita Popov' | ||
rfc/source_files_without_opening_tag.1334101535.txt.gz · Last modified: 2017/09/22 13:28 (external edit)