Page 1 of 1

About create_function

Posted: Sat Aug 06, 2005 8:47 am
by renaud
As create_function create a function from a string, I'm looking to create a string from a function... well I need to analyse the content of a function before to execute it.
Thank you in advance

Posted: Sat Aug 06, 2005 8:57 am
by Ambush Commander
If you used create_function, then you must have the string. Since you don't have the string, you didn't use create function. That means you want to move a global function to a string. But you need to analyse the content of the function before executing it. Global functions don't need to be analyzed.

Contradiction!

Please explain your problem more clearly. Where are these functions coming from? And why do you need to analyze them?

Posted: Sat Aug 06, 2005 10:06 am
by feyd
if you are using php5, you can use the ReflectionFunction class to find out information about a function, although not the internals of the function, however it can tell you what line the function starts and stops at and what file it's defined in..