note 66812 added to control-structures.declare

From: Date: Tue, 30 May 2006 07:06:16 +0000
Subject: note 66812 added to control-structures.declare
Groups: php.notes 
Request: Send a blank email to php-notes+get-112526@lists.php.net to get a copy of this message
The scope of the declare() call if used without a block is a little unpredictable, in my experience. It appears that if placed in a method or function, it may not apply to the calls that ensue, like the following: function a() { declare(ticks=2); b(); } function b() { // The declare may not apply here, sometimes. } So, if all of a sudden the signals are getting ignored, check this. At the risk of losing the ability to make a mathematical science out of placing a number of activities at varying durations of ticks like many people have chosen to do, I've found it simple to just put this at the top of the code, and just make it global. ---- Server IP: 216.194.113.175 Probable Submitter: 69.244.181.136 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/control-structures.declare.php Edit -- http://master.php.net/note/edit/66812 Del: integrated -- http://master.php.net/note/delete/66812/integrated Del: useless -- http://master.php.net/note/delete/66812/useless Del: bad code -- http://master.php.net/note/delete/66812/bad+code Del: spam -- http://master.php.net/note/delete/66812/spam Del: non-english -- http://master.php.net/note/delete/66812/non-english Del: in docs -- http://master.php.net/note/delete/66812/in+docs Del: other reasons-- http://master.php.net/note/delete/66812 Reject -- http://master.php.net/note/reject/66812 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#112526) next »