Find limit of recursion: Difference between revisions
Content added Content deleted
(add link to Delphi for pascal) |
(PHP recursion limits) |
||
Line 898: | Line 898: | ||
Stack overflow |
Stack overflow |
||
?</pre> |
?</pre> |
||
=={{header|PHP}}== |
|||
<lang PHP><?php |
|||
function a() { |
|||
static $i = 0; |
|||
print ++$i . "\n"; |
|||
a(); |
|||
} |
|||
a();</lang> |
|||
Sample output: |
|||
1 |
|||
2 |
|||
3 |
|||
[...] |
|||
597354 |
|||
597355 |
|||
597356 |
|||
597357 |
|||
597358 |
|||
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261904 bytes) in [script-location.php] on line 5 |
|||
=={{header|PL/I}}== |
=={{header|PL/I}}== |