Date: 02/07/03
- Next message: Philip Olson: "[PHP-DOC] cvs: phpdoc /en/language functions.xml"
- Previous message: elmarto <email protected>: "[PHP-DOC] #22113 [NEW]: error in one of your documentation-examples"
- In reply to: elmarto <email protected>: "[PHP-DOC] #22113 [NEW]: error in one of your documentation-examples"
- Next in thread: philip <email protected>: "[PHP-DOC] #22113 [Opn->Csd]: error in one of your documentation-examples"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 22113
User updated by: elmarto <email protected>
Reported By: elmarto <email protected>
Status: Open
Bug Type: Documentation problem
Operating System: linux debian
PHP Version: 4.3.0
New Comment:
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();
Previous Comments:
------------------------------------------------------------------------
[2003-02-07 13:32:01] elmarto <email protected>
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 this bug report at http://bugs.php.net/?id=22113&edit=1-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Philip Olson: "[PHP-DOC] cvs: phpdoc /en/language functions.xml"
- Previous message: elmarto <email protected>: "[PHP-DOC] #22113 [NEW]: error in one of your documentation-examples"
- In reply to: elmarto <email protected>: "[PHP-DOC] #22113 [NEW]: error in one of your documentation-examples"
- Next in thread: philip <email protected>: "[PHP-DOC] #22113 [Opn->Csd]: error in one of your documentation-examples"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

