Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Wez Furlong's Blog:
PHP dtrace 1.0.3
Sep 06, 2005 @ 10:36:10

Wez has a quick note over on his blog today about some additions to the dtrace module, mainly to benefit PHP5 users out there.

I added two new probe parameters to the dtrace module; they don't do anything useful with PHP 4, but if you're running PHP 5, they add the classname (arg3) and a scoping operator (arg4) (either "::", "->" or "") that are filled in when making a call to an object or a static call to a class.

This means that you can use the concatentation of arg3, arg4 and arg0 (in that order) for the full name of the method or function being called.

Very nicely done - I can assure you that this will come in quite handy for some of those error checking procedures that are in place. PHP debugging is one if the big gripes that people have about the language, and having things like this can help improve that situation dramatically...

tagged:

Link:


Trending Topics: