note 3607 deleted from functions.variable-functions by didou

From: Date: Mon, 04 Aug 2003 06:00:34 +0000
Subject: note 3607 deleted from functions.variable-functions by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53296@lists.php.net to get a copy of this message
Note Submitter: kcavness@proxicom.com ---- Re: > This is strange because variable > functions should also work inside > objects. Example: $obj is a object: > $obj->func = 'foo'; $obj->func(); > This doesn't work but should, wouldn't > it be normal? Actually, no. What you've done here is made $obj->func a string, and then tried to turn it into a function. What you should do instead is {$obj->func}() -- this will force the $obj->func variable to be interpolated first, and will then interpolate it as a function. I think. It's all a bit confusing :)

« previous php.notes (#53296) next »