note 10256 added to Spotting References
| From: | ole at coreconvergence dot com | Date: | Thu, 21 Dec 2000 12:29:02 +0000 |
| Subject: | note 10256 added to Spotting References | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8987@lists.php.net to get a copy of this message | ||
You can, in php 4.0.4, redirect $this..
<pre>
<?
class foo
{
function doit(&$input) //constructor
{ $this &= $input; }
function print()
{ echo "foo"; }
}
class bar
{
function print()
{ echo "bar"; }
}
$foo=new foo;
$bar=new bar;
$foo->print();
$foo->doit();
$foo->print();
</pre>
Will print:
foobar
http://www.php.net/manual/language.references.spot.php