Edit report at http://bugs.php.net/bug.php?id=20859&edit=1
ID: 20859 Updated by: [email protected] Reported by: mitja at doticni dot net Summary: request: declare(ticks) should carry over into functions -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: any PHP Version: 4.3.0RC2 Block user comment: N Private report: N New Comment: declare(ticks) is no more. Previous Comments: ------------------------------------------------------------------------ [2002-12-06 09:33:02] mitja at doticni dot net in the above example, there should be a register_tick_function, of course :) ------------------------------------------------------------------------ [2002-12-06 09:31:56] mitja at doticni dot net When using declare(ticks=xx), the ticking doesn't work in any functions that are called from within this block. It would be really helpful (to me, anyway :), if this worked: $endtime=time()+10; $abort=false; function setabort() { global $endtime, $abort; if (time()>=$endtime) $abort=true; } function SomeFunc() { global $abort; while (!$abort) { // do stuff // call func()s // do some more stuff } } declare(ticks=1000) { SomeFunc(); } -- now, currently this works if I put declare() blocks in SomeFunc() and all functions it calls, but it seems a lot of work for something simple. It would be nice if one could just turn ticks on and off without changing every function in a script... (checking time() each iteration is slow) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=20859&edit=1
