note 83110 added to language.oop5.magic
| From: | yanleech at gmail dot com | Date: | Sat, 10 May 2008 13:24:09 +0000 |
| Subject: | note 83110 added to language.oop5.magic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139236@lists.php.net to get a copy of this message | ||
Maybe we can using unserialize() & __wakeup() instead "new" when creating a new
instance of class.
Consider following codes:
class foo
{
static public $WAKEUP_STR = 'O:3:"foo":0:{}';
public function foo(){}
public function bar(){}
}
$foo = unserialize(foo::$WAKEUP_STR);
----
Server IP: 210.51.44.91
Probable Submitter: 116.19.236.253
----
Manual Page -- http://www.php.net/manual/en/language.oop5.magic.php
Edit -- https://master.php.net/note/edit/83110
Del: integrated -- https://master.php.net/note/delete/83110/integrated
Del: useless -- https://master.php.net/note/delete/83110/useless
Del: bad code -- https://master.php.net/note/delete/83110/bad+code
Del: spam -- https://master.php.net/note/delete/83110/spam
Del: non-english -- https://master.php.net/note/delete/83110/non-english
Del: in docs -- https://master.php.net/note/delete/83110/in+docs
Del: other reasons-- https://master.php.net/note/delete/83110
Reject -- https://master.php.net/note/reject/83110
Search -- https://master.php.net/manage/user-notes.php