#22113 [NEW]: error in one of your documentation-examples
| From: | elmarto at gmx dot de | Date: | Fri, 07 Feb 2003 19:32:01 +0000 |
| Subject: | #22113 [NEW]: error in one of your documentation-examples | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969351661@lists.php.net to get a copy of this message | ||
From: elmarto@gmx.de
Operating system: linux debian
PHP version: 4.3.0
PHP Bug Type: Documentation problem
Bug description: error in one of your documentation-examples
in your documentation on page
http://www.php.net/manual/en/functions.variable-functions.php
there is a
mistake with the latest example 13.4.
it says:
<?php
class Foo
{
function Var()
{
$name = 'Bar';
$this->$name(); // This calls the Bar() method
}
function Bar()
{
echo "This is Bar";
}
}
$foo = new Foo();
$funcname = "Var";
$foo->$varname(); // This calls $foo->Var()
?>
The $foo->$varname(); will produce an undefined function error.
It has to be $foo->funcname();
--
Edit bug report at http://bugs.php.net/?id=22113&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22113&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22113&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22113&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22113&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22113&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22113&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22113&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22113&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22113&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22113&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22113&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22113&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22113&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22113&r=gnused