You are here: Re: [PHP] which class it is? « PHP « IT news, forums, messages
Re: [PHP] which class it is?

Posted by Anirudh Dutt on 03/04/05 14:46

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация