Skip to content

Instantly share code, notes, and snippets.

@nikic
Created April 27, 2012 15:47
Show Gist options
  • Save nikic/2510299 to your computer and use it in GitHub Desktop.
Save nikic/2510299 to your computer and use it in GitHub Desktop.
<?php
register_tick_function(function() {
static $i = 0;
if (++$i >= 100000) {
throw new Exception('Too many ticks!');
}
});
declare(ticks=1) {
while (true) { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment