|
Posted by Anirudh Dutt on 03/04/05 16:47
On Fri, 04 Mar 2005 14:23:29 +0100, Jochem Maas <jochem@iamjochem.com> wrote:
> anirudh dutt wrote:
> > On Fri, 04 Mar 2005 12:37:55 +0100, Jochem Maas <jochem@iamjochem.com> wrote:
> >
> >>anirudh dutt wrote:
> >>
> >>
> >>won't debugme be available to all functions/methods?
>
> any function (outside of a class definition of course) you define is available
> everywhere yes.
i know, was clarifying that 'public' needn't be used as u had assumed.
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,.....
(wasn't using 'public')...just meant a publicly available function ;-)
> have you tried:
>
> var_dump( $obj );
> print_r( $obj );
> print_r( $obj, true );
> var_export( $obj );
> var_export( $obj, true );
i figured the aim was to use a customized debug function and not just
'one' of these. i agree that they can be used. so they'd be stuffed in
there as soon as we figure out how best to define/call it.
[answer]
get_class() to find the object's class in the debug function (which is
passed the object as an argument)
[/answer]
yangshiqi hasn't responded after
http://marc.theaimsgroup.com/?l=php-general&m=110992943630914&w=2 so
don't know what he's read/followed/agreed/used...
the archive seems to have mixed up the order of two of our mails even
though the timing is fine and the 'references' and 'message-id' are
what they should be.
http://marc.theaimsgroup.com/?t=110991039600001&r=1&w=2
> also have a look at exceptions again: e.g.
>
> DebugMe extends Exception()
internal class, eh?
http://in.php.net/manual/en/language.exceptions.php
interesting. i think i'll use it.
> >
> > btw, can't that be done in c++?
>
> probably - that doesn't make a good thing by definition tho. besides php
> is definitely not c++, on top of which php itself is written in c, which isn't
> c++ either ;-)
absolutely ;-)
> >
> > forgot about the pass by reference default-ness in php5
>
> it just is, there is no alternative, other than to run in
> zend1 compatibility mode (can't remember the ini setting name) which gives you
> the php4 object behaviour but that totally defeats the purpose, and I don't
> really consider it 'proper' php5 (its nice when your moving a complex app from 4 to 5)
>
> and its just sooooo much nicer :-)
yes, _setting_ php5 to php4's object behaviour would be heresy.
the setting is
zend.ze1_compatibility_mode = Off (off is good)
--
]#
Anirudh Dutt
....pilot of the storm who leaves no trace
like thoughts inside a dream
[Back to original message]
|