PHP 4.0 Bug #7728 Updated: Dynamic function names
| From: | ignacio at openservices dot net | Date: | Thu, 09 Nov 2000 16:19:53 +0000 |
| Subject: | PHP 4.0 Bug #7728 Updated: Dynamic function names | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37579@lists.php.net to get a copy of this message | ||
ID: 7728
User Update by: ignacio@openservices.net
Status: Closed
Bug Type: Feature/Change Request
Description: Dynamic function names
Umm...no. That attempts to call $ABC123(), which is not the same thing.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-09 11:14:52] derick@php.net
You can use:
${$abc."123"}
note the curly braces.
So there is no need for this "feature".
---------------------------------------------------------------------------
[2000-11-09 11:05:19] ignacio@openservices.net
The following works:
"""
$abc="ABC";
$t=$abc."123";
$t(); // Calls ABC123()
"""
but there's no obviously apparent reason that:
"""
$abc="ABC";
($abc."123")(); // Calls ABC123()
"""
shouldn't work the same way.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7728