From: [EMAIL PROTECTED] Operating system: any PHP version: 4.3.0RC2 PHP Bug Type: Feature/Change Request Bug description: request: declare(ticks) should carry over into functions
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 bug report at http://bugs.php.net/?id=20859&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20859&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20859&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20859&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20859&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20859&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20859&r=support Expected behavior: http://bugs.php.net/fix.php?id=20859&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20859&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20859&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20859&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20859&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20859&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20859&r=isapi