note 76081 added to language.oop5.static

From: Date: Fri, 29 Jun 2007 08:38:23 +0000
Subject: note 76081 added to language.oop5.static
Groups: php.notes 
Request: Send a blank email to php-notes+get-128072@lists.php.net to get a copy of this message
Use a variable to initialize a static variable also trigger errors. For example: <?php function test() { $t = time(); static $buf[] = $t; // this wouldn't work } ?> But you can do it seperatly: <?php function test() { static $buf; $t = time(); $buf[] = $t; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 81.169.155.246 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.static.php Edit -- https://master.php.net/note/edit/76081 Del: integrated -- https://master.php.net/note/delete/76081/integrated Del: useless -- https://master.php.net/note/delete/76081/useless Del: bad code -- https://master.php.net/note/delete/76081/bad+code Del: spam -- https://master.php.net/note/delete/76081/spam Del: non-english -- https://master.php.net/note/delete/76081/non-english Del: in docs -- https://master.php.net/note/delete/76081/in+docs Del: other reasons-- https://master.php.net/note/delete/76081 Reject -- https://master.php.net/note/reject/76081 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128072) next »