Hello Brad,

funny i checked so many complex errors that i overlooked one of the more
obvious errors. In your script an implicit public property would overwrite
an inherited public one. During class inheritance the default value must now
be copied from parent to child. The copy code however also works for
situations other situations, for instance when the inherited property is
proteced. And there the order of destructing the old default value and
copying the new one didn't matter. In this case it does - oder fixed now.

Monday, September 8, 2003, 10:24:49 PM, you wrote:


> I hope that these fixes don't mean that the following is now
> on-purpose behavior:

> <?php
> class base
> {
>     public $x = 1;
> }
> class bar extends base
> {
>     public function __construct()
>     {
>         var_dump($this->x);
>     }
> }
> $b = new bar;
?>>
> Output:
>     Notice: Undefined property:  bar::$x in ack.php on line 10
>     NULL


> On Wed, 3 Sep 2003, Marcus Börger wrote:

>> Hello Zeev,
>>
>> Friday, August 29, 2003, 10:15:57 AM, you wrote:
>>
>> > Fixed!
>>
>> Yes you fixed it for implicit properties and i fixed it for internal
>> properties. Now we still have to fix it for user space default properties
>> and static properties. And for static properties we should disallow
>> overriding the initial value becasue that make no sense at all.
>>
>>
>> --
>> Best regards,
>>  Marcus                            mailto:[EMAIL PROTECTED]
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>



-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to