note 55979 added to ref.classobj

From: Date: Fri, 19 Aug 2005 15:35:55 +0000
Subject: note 55979 added to ref.classobj
Groups: php.notes 
Request: Send a blank email to php-notes+get-93905@lists.php.net to get a copy of this message
Re: Note by: ia [AT] zoznam [DOT] sk on 03-Aug-2005 03:55 There should only be one dollar sign when instantiating an object with a class of a string value of a variable. <?php ... ... // and then call constructor like this: $dbName = "MySQL"; $db = new $dbName ( ... ); // ... which creates an object of class MySQL ?> Also note, this is a PHP5 only feature. ---- Manual Page -- http://www.php.net/manual/en/ref.classobj.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55979 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55979&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55979&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55979&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55979&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55979&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55979&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55979&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93905) next »