note 45258 added to language.oop
| From: | babs at sntteam dot org | Date: | Tue, 31 Aug 2004 14:22:15 +0000 |
| Subject: | note 45258 added to language.oop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75740@lists.php.net to get a copy of this message | ||
We can't split the class declaration in multiple PHP section but we can exit php tag in a
function . ex :
<?
class plop {
function plop() {
$this->whatever = "bar";
}
function foo() {
?>
<pre>foo returns <?=$this->whatever?></pre>
<?
}
};
$a = new plop;
$a->foo();
?>
will print : foo returns bar
PHP Version 4.3.8-9
----
Manual Page -- http://www.php.net/manual/en/language.oop.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45258
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45258&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45258&report=yes
Search -- http://master.php.net/manage/user-notes.php