note 123676 added to control-structures.declare
| From: | digitalaudiorock at gmail dot com | Date: | Sun, 10 Mar 2019 09:10:10 +0000 |
| Subject: | note 123676 added to control-structures.declare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-210345@lists.php.net to get a copy of this message | ||
Regarding my previous comment as to the change in scope of declare(ticks=1) between 5.6 and 7.x, I
intended to mention another example of the affect this can have on signal handlers:
If your script uses declare(ticks=1) and assigns handlers, in 5.6 signals will get caught and call
the handler even when the code that is running is in an included file (where the included file
doesn't have the declaration). However in 7.x the signal wouldn't get caught until the
code returns to the main script.
The best solution to that is to use pcntl_async_signals(true) when it's available, which will
allow the signals to get caught regardless of what file the code happens to be in.
----
Server IP: 208.43.231.9
Probable Submitter: 82.199.157.34 (proxied: 216.151.180.131)
----
Manual Page -- http://php.net/manual/en/control-structures.declare.php
Edit -- https://master.php.net/note/edit/123676
Del: integrated -- https://master.php.net/note/delete/123676/integrated
Del: useless -- https://master.php.net/note/delete/123676/useless
Del: bad code -- https://master.php.net/note/delete/123676/bad+code
Del: spam -- https://master.php.net/note/delete/123676/spam
Del: non-english -- https://master.php.net/note/delete/123676/non-english
Del: in docs -- https://master.php.net/note/delete/123676/in+docs
Del: other reasons-- https://master.php.net/note/delete/123676
Reject -- https://master.php.net/note/reject/123676
Search -- https://master.php.net/manage/user-notes.php