note 103530 added to language.oop5.static
| From: | gratcypalma at gmail dot om | Date: | Mon, 18 Apr 2011 18:50:17 +0000 |
| Subject: | note 103530 added to language.oop5.static | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178954@lists.php.net to get a copy of this message | ||
<?php
class foo {
private static $getInitial;
public static function getInitial() {
if (self::$getInitial == null)
self::$getInitial = new foo();
return self::$getInitial;
}
}
foo::getInitial();
/*
this is the example to use new class with static method..
i hope it help
*/
?>
----
Server IP: 69.147.83.197
Probable Submitter: 122.144.3.3
----
Manual Page -- http://www.php.net/manual/en/language.oop5.static.php
Edit -- https://master.php.net/note/edit/103530
Del: integrated -- https://master.php.net/note/delete/103530/integrated
Del: useless -- https://master.php.net/note/delete/103530/useless
Del: bad code -- https://master.php.net/note/delete/103530/bad+code
Del: spam -- https://master.php.net/note/delete/103530/spam
Del: non-english -- https://master.php.net/note/delete/103530/non-english
Del: in docs -- https://master.php.net/note/delete/103530/in+docs
Del: other reasons-- https://master.php.net/note/delete/103530
Reject -- https://master.php.net/note/reject/103530
Search -- https://master.php.net/manage/user-notes.php