- var_dump: documentation ( source)
- debug_backtrace: documentation ( source)
- str_repeat: documentation ( source)
<?php
function a($depth = 0) {
//return last backtrace call. If backtrace bigger then 3, return third call.
if($depth === 1000) {
debug_backtrace(false);
}
return a(++$depth, str_repeat("a", 1000));
}
var_dump(a());