php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch recursion.patch for Scripting Engine problem Bug #69424

Patch version 2015-04-10 23:21 UTC

Return to Bug #69424 | Download this patch
Patch Revisions:

Developer: cmb

Index: en/language/functions.xml
===================================================================
--- en/language/functions.xml	(revision 336484)
+++ en/language/functions.xml	(working copy)
@@ -141,9 +141,7 @@
    </simpara>
    
    <para>
-    It is possible to call recursive functions in PHP. However avoid recursive
-    function/method calls with over 100-200 recursion levels as it can smash
-    the stack and cause a termination of the current script.
+    It is possible to call recursive functions in PHP.
     <example>
      <title>Recursive functions</title>
      <programlisting role="php">
@@ -160,6 +158,13 @@
 ]]>
      </programlisting>
     </example>
+   <note>
+    <simpara>
+     Recursive function/method calls with over 100-200 recursion levels can
+     smash the stack and cause a termination of the current script. Especially,
+     infinite recursion is considered a programming error.
+    </simpara>
+   </note>
    </para>
 
   </sect1>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 07:02:12 2024 UTC