Re: which class it is?

From: Date: Fri, 04 Mar 2005 12:46:55 +0000
Subject: Re: which class it is?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-209971@lists.php.net to get a copy of this message
On Fri, 04 Mar 2005 12:37:55 +0100, Jochem Maas <jochem@iamjochem.com> 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

« previous php.general (#209971) next »