note 78749 deleted from language.oop5 by danbrown

From: Date: Mon, 15 Feb 2010 18:12:17 +0000
Subject: note 78749 deleted from language.oop5 by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165980@lists.php.net to get a copy of this message
Note Submitter: unclesam at yourshowcase dot com ---- I discovered by experimentation (when I found it to be undocumented or mentioned in a forum), that it is possible to use anonymous class names when instantiating an object. To wit: class Something { public $someproperty = "somevalue"; } ... $class = "Something"; $object = new $class; echo "{$object->someproperty}\n"; will show: somevalue

« previous php.notes (#165980) next »