note 115481 added to language.oop5.static

From: Date: Fri, 01 Aug 2014 22:01:34 +0000
Subject: note 115481 added to language.oop5.static
Groups: php.notes 
Request: Send a blank email to php-notes+get-200086@lists.php.net to get a copy of this message
<?php class StaticInitialization { private static $_arr; public static function staticInitialize(){ $a = array_fill( 0, 10, null ); $a[3] = 'tres'; $a[7] = 'siete'; $a[9] = $a[3] . $a[7]; self::$_arr = $a; } public static function echoInternal(){ echo var_dump( self::$_arr ); } } // we have to call the static initializer StaticInitialization::staticInitialize(); // test that it is initialized StaticInitialization::echoInternal(); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 187.188.131.102 ---- Manual Page -- http://php.net/manual/en/language.oop5.static.php Edit -- https://master.php.net/note/edit/115481 Del: integrated -- https://master.php.net/note/delete/115481/integrated Del: useless -- https://master.php.net/note/delete/115481/useless Del: bad code -- https://master.php.net/note/delete/115481/bad+code Del: spam -- https://master.php.net/note/delete/115481/spam Del: non-english -- https://master.php.net/note/delete/115481/non-english Del: in docs -- https://master.php.net/note/delete/115481/in+docs Del: other reasons-- https://master.php.net/note/delete/115481 Reject -- https://master.php.net/note/reject/115481 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200086) next »