MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000264XdebugFeature/Change requestpublic2007-05-03 19:502016-12-13 21:42
Reporterywarnier 
Assigned To 
PrioritynormalSeveritytweakReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000264: Overload opcodes for isset(), empty(), ...
DescriptionFollowing a discussion on the mailing-list (see additional info), I am filing this feature request for post-2.0.0 to try and overload the opcodes of functions like isset() and empty(), to allow tracking them as well.

In the meantime, if isset() needs to be tracked, a slow and dirty hack is to wrap isset() into a homemade function myisset($var){return isset($var);}

The tracing of these calls could also become very *noisy*, so maybe it would be good to have a tracing option just for this.
Additional InformationThe mailing-list discussion leading to this feature request.


On Thu, 3 May 2007, Yannick Warnier wrote:

> Le jeudi 03 mai 2007 à 09:05 +0200, Derick Rethans a écrit :
> > On Wed, 2 May 2007, Sean Coates wrote:
> >
> > > Yannick Warnier wrote:
> > > > Hello,
> > > >
> > > > I'm using xdebug 2.0.0 RC3. Is there a reason why calls to isset() and
> > > > empty() are not reported in traces?
> > >
> > > I suspect for the same reason that instanceof and == are not shown in
> > > traces (they're not actual functions).
> >
> > That is correct, isset() and empty() are language constructs in PHP.
>
> OK, thanks to both.
> I suppose the classic way of getting around that (if needs be) is to
> write a wrapper function like
> function myisset($var){return isset($var);}
> which I did and it worked fine (but you have to replace all the isset()
> calls by myisset() calls in the script that worries you).

Another possibility would be that I overload those opcodes (if possible)
and expose them as function calls. I am not sure how possible this is
though. Feel free to file a feature request at http://bugs.xdebug.org [^] so
that I can have a look at it for after 2.0 has been released.

regards,
Derick
TagsNo tags attached.
Operating System
PHP Version5.1.6
Attached Files

- Relationships

-  Notes
(0004059)
derick (administrator)
2016-12-13 21:42

I might want to implement this, but it's not high on my list of things to do.

- Issue History
Date Modified Username Field Change
2007-05-03 19:50 ywarnier New Issue
2016-12-13 21:42 derick Status new => acknowledged
2016-12-13 21:42 derick Note Added: 0004059


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker