note 112939 added to control-structures.declare

From: Date: Fri, 09 Aug 2013 06:31:39 +0000
Subject: note 112939 added to control-structures.declare
Groups: php.notes 
Request: Send a blank email to php-notes+get-195920@lists.php.net to get a copy of this message
In the following example: <?php function handler(){ print "hello <br />"; } register_tick_function("handler"); declare(ticks = 1){ $b = 2; } //closing curly bracket tickable ?> "Hello" will be displayed twice because the closing curly bracket is also tickable. One may wonder why the opening curly bracket is not tickable if the closing is tickable. This is because the instruction for PHP to start ticking is given by the opening curly bracket so the ticking starts immediately after it. ---- Server IP: 69.147.83.199 Probable Submitter: 96.44.148.246 ---- Manual Page -- http://php.net/manual/en/control-structures.declare.php Edit -- https://master.php.net/note/edit/112939 Del: integrated -- https://master.php.net/note/delete/112939/integrated Del: useless -- https://master.php.net/note/delete/112939/useless Del: bad code -- https://master.php.net/note/delete/112939/bad+code Del: spam -- https://master.php.net/note/delete/112939/spam Del: non-english -- https://master.php.net/note/delete/112939/non-english Del: in docs -- https://master.php.net/note/delete/112939/in+docs Del: other reasons-- https://master.php.net/note/delete/112939 Reject -- https://master.php.net/note/reject/112939 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195920) next »