Skip to content

Instantly share code, notes, and snippets.

@vojtech-dobes
Created April 29, 2013 14:19
Show Gist options
  • Save vojtech-dobes/5481845 to your computer and use it in GitHub Desktop.
Save vojtech-dobes/5481845 to your computer and use it in GitHub Desktop.
Getting to stacktrace in n-iteration easily
<?php
function stop($step = 1) {
static $i = 0;
$i++;
if ($i >= $step) {
$stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment