]> granicus.if.org Git - php/commit
@Added PHP API for Zend's ticks
authorStig Bakken <ssb@php.net>
Tue, 29 Aug 2000 09:18:48 +0000 (09:18 +0000)
committerStig Bakken <ssb@php.net>
Tue, 29 Aug 2000 09:18:48 +0000 (09:18 +0000)
commit1b4d8c0fb616f33dc5386e180b4201fc996014cd
tree4dfb62cdf17402d63718fac5cf6c04df0738fa90
parentfad9bab629b93a81213d79da7b62994d0ba0f5b1
@Added PHP API for Zend's ticks
Added PHP API for registering tick functions.  Ticks is a per-instruction
callback in Zend that allows us to implement cooperative multitasking
within PHP.  Example:

In extension code:

php_add_tick_function(my_tick_func);

void my_tick_func(int count) {
    php_printf("[tick %d]", count);
}

In PHP code:
<?php

declare(ticks = 1) {
    print "there should be two ticks here.\n";
}

?>
main/main.c
main/php_ticks.c
main/php_ticks.h