@@ -4,14 +4,12 @@ Examples need to be clear and simple, but should show the possibilities and
44usage of the functions used. Only use OOP features where you would like to
55present them, use simple functions in other areas.
66
7- Examples should generally conform to the [ PEAR coding standards] [ pear-cs ] .
8-
97## Requirements
108
119- When appropriate, use superglobals
1210- Never generate PHP errors (` E_ALL|E_STRICT ` friendly)
1311- Be short and generic
14- - Follow the PEAR coding standards
12+ - Follow the current [ PHP-FIG PER Coding Style ] [ per-cs ]
1513
1614## Program listing roles (` <programlisting role="xxx"> ` )
1715
@@ -200,15 +198,7 @@ echo "an {$array['key']} key";
200198echo 'an ', $array['key'], ' key';
201199```
202200
203- ## How to write...
204-
205- ### Control Structures
206-
207- See PEAR coding standards
208-
209- ### Functions
210-
211- #### Function naming
201+ ## Function naming
212202
213203Procedural function names should be lowercase. If multiple words are
214204needed in the function name, use a ` _ ` (also known as snake\_ case).
@@ -217,17 +207,7 @@ Example: `foo_function();`
217207OOP method names should follow the standard coding style which uses
218208camelCase, such as ` fooFunction() ` .
219209
220- #### Function calls
221- #### Function definitions
222-
223- See PEAR coding standards
224-
225- ### Comments
226- ### Example URLs/Emails
227-
228- See PEAR coding standards
229-
230- ### Example output
210+ ## Example output
231211
232212For very short example printouts, use C++ style comment (` // ` ) on the
233213line where the output occurs, or in the description above the line:
@@ -292,4 +272,4 @@ array(3) {
292272 </refsect1 >
293273```
294274
295- [ pear -cs] : http ://pear .php.net/manual/en/standards.php
275+ [ per -cs] : https ://www .php-fig.org/per/coding-style/
0 commit comments