Edit report at https://bugs.php.net/bug.php?id=61615&edit=1
ID: 61615 Updated by: ahar...@php.net Reported by: quirenbach at moe dot de Summary: repeated register_tick_function -Status: Open +Status: Not a bug Type: Bug Package: *General Issues PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: Calling unregister_tick_function() twice removes both tick functions, so I'd say this is behaving as expected. Example: <?php declare(ticks=1); function a() { echo "tick\n"; } echo "Registering...\n"; register_tick_function('a'); register_tick_function('a'); foreach (range(0, 5) as $i) {} unregister_tick_function('a'); unregister_tick_function('a'); echo "Unregistered.\n"; foreach (range(0, 5) as $i) {} ?> Only outputs "tick" between "Registering..." and "Unregistered.". Previous Comments: ------------------------------------------------------------------------ [2012-04-04 03:03:52] quirenbach at moe dot de change affected php version ------------------------------------------------------------------------ [2012-04-04 03:02:21] quirenbach at moe dot de Description: ------------ you can repeated register a same tick_function. but can not remove them once. Test script: --------------- <?php function a () { echo 2; } register_tick_function("a"); register_tick_function("a"); unregister_tick_function("a"); declare(ticks=1); echo 1; echo 1; Expected result: ---------------- 11 Actual result: -------------- 221212 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61615&edit=1