|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47198 pcntl_signal needs declare(ticks) which is deprecated since 5.3
Submitted: 2009-01-23 11:37 UTC Modified: 2009-03-27 02:57 UTC
Avg. Score:3.0 ± 2.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: me at thomaskeller dot biz Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.3.0alpha3 OS: Linux
Private report: No CVE-ID:
 [2009-01-23 11:37 UTC] me at thomaskeller dot biz
To state the PHP docs on register_tick_function (

"5.3.0  	 Ticks are now deprecated and register_tick_function()  now throws an E_DEPRECATED notice."

However, ticks are needed for pcntl_signal to process signal interrupts (pcntl_signal uses them since 4.3). Deprecating ticks will make cli scripts written in PHP pretty much useless if there is no signal handling available. The documentation also misses to outline alternatives for signal handling from 5.3 onwards.

Reproduce code:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-24 12:21 UTC]
pcntl_signal_dispatch() has been added as a workaround for scripts already using pcntl_signal(). It returns true, so that you can use it in your main loop like this:

while (pcntl_signal_dispatch() && loop_condition);

pcntl_sigwaitinfo(), pcntl_sigtimedwait() and pcntl_sigprocmask() has also been added to 5.3.

 [2009-03-12 14:24 UTC]
All of the new functions are documented, however it would be useful to 
add a reference from register_tick_function to the replacement in the 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC