note 33708 added to language.oop
| From: | redshift at pandora dot be | Date: | Fri, 04 Jul 2003 15:43:53 +0000 |
| Subject: | note 33708 added to language.oop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51518@lists.php.net to get a copy of this message | ||
Hi,
You can use functions you defined in your class in another function of your class.
Like this:
class foo
{
var $string;
function bar($string)
{
return $string;
}
function foodbar()
{
$return = foo::("hello world");
return $return;
}
}
To execute it:
<?php
$myfoo = new foo;
echo $myfoo->foodbar();
?>
would produce:
hello world
----
Manual Page -- http://www.php.net/manual/en/language.oop.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33708
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33708&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33708&report=yes