rfc:true-nested-function-support

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:true-nested-function-support [2011/07/18 12:31] – [Todo for this RFC] runerfc:true-nested-function-support [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Request for Comments: How to write RFCs ======+====== Request for Comments: True nested function support ======
   * Version: 1.0   * Version: 1.0
   * Date: 2011-06-18   * Date: 2011-06-18
Line 15: Line 15:
 ===== Code examples ===== ===== Code examples =====
  
-====== 1) Appending the function name and wrapping in function_exists() ======+====== 1) Current idiomatic usage of helper functions ====== 
 +<code php> 
 +    function _prefix_functionname_helperfunctionname($arg1, $arg2) { 
 +        ; 
 +    } 
 +            
 +    function prefix_functionname() { 
 +       // Code here... 
 +       somefunc(prefix_functionname_helperfunctionname($arg1, $arg2)); 
 +    } 
 +</code> 
 + 
 +====== 2) Appending the function name and wrapping in function_exists() ======
 <code php> <code php>
     function prefix_functionname() {     function prefix_functionname() {
Line 28: Line 40:
 </code> </code>
  
-====== 2) Using closures ======+====== 3) Using closures ======
 <code php> <code php>
     function prefix_functionname() {     function prefix_functionname() {
Line 39: Line 51:
 </code> </code>
  
-====== 3) Using new syntax ======+====== 4) Using new syntax ======
 <code php> <code php>
     function prefix_functionname() {     function prefix_functionname() {
rfc/true-nested-function-support.1310992287.txt.gz · Last modified: 2017/09/22 13:28 (external edit)