Page 1 of 1

Odd request...

Posted: Mon May 01, 2006 11:05 pm
by alex.barylski
Does anyone know of a hack which can be used to un-declare functions??? :P

I have tried unset() on the array of get_defined_functions() but that just removes the function from that returned array, as it's clearly not a reference to the actual internal array of declared functions, cuz if I try and redefine the unset function...everything still pukes all over me :(

Likely not possible as that was my only thought...but thats why i'm asking for a *hack* inside of PHP no mod C source or anything...this must be PHP code only!!!

Cheers :)

Posted: Mon May 01, 2006 11:11 pm
by feyd
You can use the runkit to alter existing functions, but redefining them, not possible in pure php.

Posted: Mon May 01, 2006 11:20 pm
by alex.barylski
Not sure if those will do what I need...

But cooooooooooool 8)

I swear you must spend your evenings reading the PHP docs :P

Know of any nifty debug functions, particularly hooking related?

Posted: Mon May 01, 2006 11:24 pm
by feyd
runkit and Xdebug in combination?

Posted: Tue May 02, 2006 12:01 am
by alex.barylski
feyd wrote:runkit and Xdebug in combination?
I'll check it out, thank you :)

Posted: Tue May 02, 2006 12:39 am
by alex.barylski
feyd wrote:You can use the runkit to alter existing functions, but redefining them, not possible in pure php.
Dude...after close inspection and a quick breather...it does appear as though...runkits are what I am looking for...

not exactly a hook like how I would expect, but it might solve some of the problems...

Wicked cool...thanks man...

You truely are the PHP API bible 8)