If we're going to change it, can we make it "visibility:class:name"
instead, as this seems more intuitive and readable.

eg:  private:TT:pri

--Wez.

On 5/21/05, Marcus Boerger <[EMAIL PROTECTED]> wrote:
> Hello internals,
> 
>   i want to chnage the output of print_r() and var_dump() so that it
> shows the class a private property was declared in. The problem is that at
> the moment both only state that the property is private so that you cannot
> see which class level it belongs to and if there is any derived class with
> a private property having the same name you cannot distinguish them.
> 
> See patch attached.
> 
> Here is the output of the unpatched version:
> php > class T {
> php { protected $pro = 1;
> php { private $pri = 2;
> php { public $pub = 3;
> php { }
> ew T;
> php > $o = new T;
> php > print_r($o);
> T Object
> (
>     [pro:protected] => 1
>     [pri:private] => 2
>     [pub] => 3
> )
> php > class TT extends T {
> php { private $pri = 4;
> php { }
> php > $oo = new TT;
> php > print_r($oo);
> TT Object
> (
>     [pri:private] => 4
>     [pro:protected] => 1
>     [pri:private] => 2
>     [pub] => 3
> )
> php >
> 
> Here is the output of the patched version:
> php > class T {
> php { protected $pro = 1;
> php { private $pri = 2;
> php { public $pub = 3;
> php { }
> php > $o = new T;
> php > print_r($o);
> T Object
> (
>     [pro:protected] => 1
>     [pri:private:T] => 2
>     [pub] => 3
> )
> php > class TT extends T {
> php { private $pri = 4;
> php { }
> php > $oo = new TT;
> php > print_r($oo);
> TT Object
> (
>     [pri:private:TT] => 4
>     [pro:protected] => 1
>     [pri:private:T] => 2
>     [pub] => 3
> )
> 
> If nobody objects i'll apply this tomorrow.
> 
> --
> Best regards,
>  Marcus                          mailto:[EMAIL PROTECTED]
> 
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
>

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

Reply via email to