Edit report at https://bugs.php.net/bug.php?id=61693&edit=1
ID: 61693 Updated by: larue...@php.net Reported by: hugosmail at gmail dot com Summary: unregister_tick in registered function Status: Open Type: Feature/Change Request Package: Unknown/Other Function Operating System: Windows PHP Version: 5.4.0 Block user comment: N Private report: N New Comment: there is a list to reservers user tick functions, when doing tick call, php will call user tick functions iteratively via go through that list. if you delete the element which is calling, then the iterator will be messed . of course, technically, it can be implemented, but the pay will be expensive. and, I think you can do it like: register_tick_function(); tick, tick, unregister_tick_functiono() Previous Comments: ------------------------------------------------------------------------ [2012-04-11 12:46:05] hugosmail at gmail dot com Description: ------------ Hi, while I'm trying call unregister_tick_function() in function executed by register_tick_function(), I get a "Warning: unregister_tick_function(): Unable to delete tick function executed at the moment" I don't know, if this is a bug, but it may be very useful to call unregister like this. Test script: --------------- <?php declare(ticks = 1); function a() { echo "a"; unregister_tick_function("a"); } register_tick_function("a"); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61693&edit=1