summaryrefslogtreecommitdiff
path: root/zend/documentation/manual/core/en/coding-standard.php-file-formatting.html
diff options
context:
space:
mode:
Diffstat (limited to 'zend/documentation/manual/core/en/coding-standard.php-file-formatting.html')
-rw-r--r--zend/documentation/manual/core/en/coding-standard.php-file-formatting.html152
1 files changed, 152 insertions, 0 deletions
diff --git a/zend/documentation/manual/core/en/coding-standard.php-file-formatting.html b/zend/documentation/manual/core/en/coding-standard.php-file-formatting.html
new file mode 100644
index 0000000..107f92a
--- /dev/null
+++ b/zend/documentation/manual/core/en/coding-standard.php-file-formatting.html
@@ -0,0 +1,152 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
+ <title>PHP File Formatting - Zend Framework Manual</title>
+
+</head>
+<body>
+<table width="100%">
+ <tr valign="top">
+ <td width="85%">
+ <table width="100%">
+ <tr>
+ <td width="25%" style="text-align: left;">
+ <a href="coding-standard.overview.html">Overview</a>
+ </td>
+
+ <td width="50%" style="text-align: center;">
+ <div class="up"><span class="up"><a href="coding-standard.html">Zend Framework Coding Standard for PHP</a></span><br />
+ <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
+ </td>
+
+ <td width="25%" style="text-align: right;">
+ <div class="next" style="text-align: right; float: right;"><a href="coding-standard.naming-conventions.html">Naming Conventions</a></div>
+ </td>
+ </tr>
+ </table>
+<hr />
+<div id="coding-standard.php-file-formatting" class="section"><div class="info"><h1 class="title">PHP File Formatting</h1></div>
+
+
+ <div class="section" id="coding-standard.php-file-formatting.general" name="coding-standard.php-file-formatting.general"><div class="info"><h1 class="title">General</h1></div>
+
+
+ <p class="para">
+ For files that contain only <acronym class="acronym">PHP</acronym> code, the closing tag (&quot;?&gt;&quot;) is
+ never permitted. It is not required by <acronym class="acronym">PHP</acronym>, and omitting it´
+ prevents the accidental injection of trailing white space into the response.
+ </p>
+
+ <blockquote><p><b class="note">Note</b>:
+
+ <em class="emphasis">Important</em>: Inclusion of arbitrary binary data as permitted
+ by <span class="methodname">__HALT_COMPILER()</span> is prohibited from
+ <acronym class="acronym">PHP</acronym> files in the Zend Framework project or files derived
+ from them. Use of this feature is only permitted for some installation scripts.
+ <br />
+ </p></blockquote>
+ </div>
+
+ <div class="section" id="coding-standard.php-file-formatting.indentation" name="coding-standard.php-file-formatting.indentation"><div class="info"><h1 class="title">Indentation</h1></div>
+
+
+ <p class="para">Indentation should consist of 4 spaces. Tabs are not allowed.</p>
+ </div>
+
+ <div class="section" id="coding-standard.php-file-formatting.max-line-length" name="coding-standard.php-file-formatting.max-line-length"><div class="info"><h1 class="title">Maximum Line Length</h1></div>
+
+
+ <p class="para">
+ The target line length is 80 characters. That is to say, Zend Framework developers
+ should strive keep each line of their code under 80 characters where possible and
+ practical. However, longer lines are acceptable in some circumstances. The maximum
+ length of any line of <acronym class="acronym">PHP</acronym> code is 120 characters.
+ </p>
+ </div>
+
+ <div class="section" id="coding-standard.php-file-formatting.line-termination" name="coding-standard.php-file-formatting.line-termination"><div class="info"><h1 class="title">Line Termination</h1></div>
+
+
+ <p class="para">
+ Line termination follows the Unix text file convention. Lines must end with a
+ single linefeed (LF) character. Linefeed characters are represented as ordinal 10,
+ or hexadecimal 0x0A.
+ </p>
+
+ <p class="para">
+ Note: Do not use carriage returns (CR) as is the convention in Apple OS&#039;s (0x0D) or
+ the carriage return - linefeed combination (<acronym class="acronym">CRLF</acronym>) as is standard
+ for the Windows OS (0x0D, 0x0A).
+ </p>
+ </div>
+ </div>
+ <hr />
+
+ <table width="100%">
+ <tr>
+ <td width="25%" style="text-align: left;">
+ <a href="coding-standard.overview.html">Overview</a>
+ </td>
+
+ <td width="50%" style="text-align: center;">
+ <div class="up"><span class="up"><a href="coding-standard.html">Zend Framework Coding Standard for PHP</a></span><br />
+ <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
+ </td>
+
+ <td width="25%" style="text-align: right;">
+ <div class="next" style="text-align: right; float: right;"><a href="coding-standard.naming-conventions.html">Naming Conventions</a></div>
+ </td>
+ </tr>
+ </table>
+</td>
+ <td style="font-size: smaller;" width="15%"> <style type="text/css">
+#leftbar {
+ float: left;
+ width: 186px;
+ padding: 5px;
+ font-size: smaller;
+}
+ul.toc {
+ margin: 0px 5px 5px 5px;
+ padding: 0px;
+}
+ul.toc li {
+ font-size: 85%;
+ margin: 1px 0 1px 1px;
+ padding: 1px 0 1px 11px;
+ list-style-type: none;
+ background-repeat: no-repeat;
+ background-position: center left;
+}
+ul.toc li.header {
+ font-size: 115%;
+ padding: 5px 0px 5px 11px;
+ border-bottom: 1px solid #cccccc;
+ margin-bottom: 5px;
+}
+ul.toc li.active {
+ font-weight: bold;
+}
+ul.toc li a {
+ text-decoration: none;
+}
+ul.toc li a:hover {
+ text-decoration: underline;
+}
+</style>
+ <ul class="toc">
+ <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
+ <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
+ <li class="header up"><a href="coding-standard.html">Zend Framework Coding Standard for PHP</a></li>
+ <li><a href="coding-standard.overview.html">Overview</a></li>
+ <li class="active"><a href="coding-standard.php-file-formatting.html">PHP File Formatting</a></li>
+ <li><a href="coding-standard.naming-conventions.html">Naming Conventions</a></li>
+ <li><a href="coding-standard.coding-style.html">Coding Style</a></li>
+ </ul>
+ </td>
+ </tr>
+</table>
+</body>
+</html> \ No newline at end of file