Thursday, July 08, 2004
Ugly Hack for byte code
Used Derik's VLD code
1. Include srm_oparray.c & srm_oparray.h in zend source files
2. The fella u want is vld_dump_oparray in srm_oparray.c - so plug him into zend.c
Derik has used the not so good method of #include php.h for everthing, which causes heaps of problems, possibly since the config has changed soo, I spent a luvrly 2 hours figuring out the exact refrences for the zend constants he has used
it turns out that only zend.h zend_compile.h zend-types.h is needed, so include the fellas instead of php.h. in both srm_oparray.c & srm_oparray.h.
Don't forget to include srm_oparray.h in zend.h
VLD uses an xtension - ext/standard/url.h for string procesing which is needed for var names and such. This is problematic..
not any more .....
lessons u can avoid learning -
1.It's bad to have duplicate definitions of functions - really really bad......
2. when some one has gone to the trouble of making efree, respect him, and use it!
yet another ugly hack - renaming php_url_encode(_hack) & hexchars(2)[].... wot to do
