Find limit of recursion: Difference between revisions

PHP recursion limits
(add link to Delphi for pascal)
(PHP recursion limits)
Line 898:
Stack overflow
?</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}}==
Anonymous user