Re: which class it is?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 04 Mar 2005 12:37:55 +0100, Jochem Maas <jochem@xxxxxxxxxxxxx> wrote:
> anirudh dutt wrote:
> > create a debug function (public) and use get_class. call that in the
> 
> if you are using the 'public' keyword then you have to use php5,.....

i meant a function like this:
in a globally included file on a server far, far away
function debugme ($obj, $mode = 'echo')
{
       $obj_class = 'Class: '. get_class($obj);
       $obj_class.= 'non static properties: '. count($obj);
       if ($mode == 'echo') {
              echo $obj_class;
       } else {
              return $obj_class;
       }
}

won't debugme be available to all functions/methods?

> > u may wanna pass by reference and make it const (won't have to use
> 
> if you're using php5 all objects are references, pass-by-reference occurs
> whether you like it or not (unless you specifically use 'clone')
> 
> ...also a constant (global or class scope) cannot be set to an object.

oh well :(

btw, can't that be done in c++?

forgot about the pass by reference default-ness in php5

-- 
]#
Anirudh Dutt


...pilot of the storm who leaves no trace
like thoughts inside a dream

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux