note 112859 added to evtimer.construct

From: Date: Tue, 30 Jul 2013 14:56:06 +0000
Subject: note 112859 added to evtimer.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-195823@lists.php.net to get a copy of this message
Example of passing custom data: <?php // Create and start timer firing after 2 seconds with custom data $w1 = new EvTimer(2, 0, function ($w) { echo "Custom data: $w->data\n"; echo "2 seconds elapsed\n"; }, 'abcd'); Ev::run(); ?> Running this will print out: Custom data: abcd 2 seconds elapsed Note that 'data' is a public property of the event EvWatcher class. ---- Server IP: 69.147.83.199 Probable Submitter: 204.15.3.184 ---- Manual Page -- http://php.net/manual/en/evtimer.construct.php Edit -- https://master.php.net/note/edit/112859 Del: integrated -- https://master.php.net/note/delete/112859/integrated Del: useless -- https://master.php.net/note/delete/112859/useless Del: bad code -- https://master.php.net/note/delete/112859/bad+code Del: spam -- https://master.php.net/note/delete/112859/spam Del: non-english -- https://master.php.net/note/delete/112859/non-english Del: in docs -- https://master.php.net/note/delete/112859/in+docs Del: other reasons-- https://master.php.net/note/delete/112859 Reject -- https://master.php.net/note/reject/112859 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195823) next »