Re: fatal static call in php 6.0?

From: Date: Sat, 27 May 2006 21:58:55 +0000
Subject: Re: fatal static call in php 6.0?
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-23733@lists.php.net to get a copy of this message
On Wed, May 24, 2006 at 11:56:06AM -0700, Todd Ruth wrote: > <?php > class TheParent { > public $x = 3; > } > class UglyUncle { > function f() { > $this->x = 5; > } > } > class Child extends TheParent { > function f() { > UglyUncle::f(); > } > } > $c = new Child(); > var_dump($c->x); > $c->f(); > var_dump($c->x); > ?> > --EXPECT-- > int(3) > int(5) "Ugly" is right. As far as I'm concerned, that code should never have worked in the first place. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.internals (#23733) next »