Re: a few other observations

From: Date: Tue, 18 May 2004 07:28:20 +0000
Subject: Re: a few other observations
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12560@lists.php.net to get a copy of this message
Hi Phpdiscuss - Php Newsgroups And Mailing Lists, you wrote: > function adjust(&$this) > { > $date = new Date($this->getTimeStamp()); > > $this->year = $date->year; > $this->month = $date->month; > $this->day = $date->day; > $this->hour = $date->hour; > $this->minute = $date->minute; > $this->second = $date->second; > > } I didn't follow the thread, but it's definitely a bad thing [tm] to use $this as parameter: <?php class foo { function bar() { print_r($this); } } class foobar { function odd() { foo::bar(); } } $f = new foobar; $f->odd(); ?> Alan pointed me at this odd behavior in the "is_a() in PEAR.php" thread. Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.pear.general (#12560) next »