|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-06 09:33 UTC] mitja at doticni dot net
[2010-12-22 15:15 UTC] johannes@php.net
-Status: Open
+Status: Bogus
-Package: Feature/Change Request
+Package: *General Issues
[2010-12-22 15:15 UTC] johannes@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 12 09:00:01 2025 UTC |
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)