note 13531 deleted from function.eval by jimw

From: Date: Sat, 08 Dec 2001 23:25:14 +0000
Subject: note 13531 deleted from function.eval by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22323@lists.php.net to get a copy of this message
It's possible to do dnyamic class instantiation with eval...for example... class bar { function bob(){ echo "BOB IS COOL"; } } $class = 'bar'; eval("\$foo = new {$class}();"); $foo->bob(); will print "BOB IS COOL"

« previous php.notes (#22323) next »