Compiling a certain piece of code
Posted: Tue Sep 08, 2009 2:08 am
Hello
I have a certain piece of php code that i load from the database on some condition...
i then create an anonymous function out of it.. using 'create_function'
this function returns a true or false...
assuming the code is safe....
How do i know/test that the code loaded does not cause a compile/syntax error
Ideally i would like to check the syntax error etc before executing and log/inform the user about the error
Any ideas / pointers / help is much appreciated...
Thank you.
PS: Im a noob
I have a certain piece of php code that i load from the database on some condition...
i then create an anonymous function out of it.. using 'create_function'
this function returns a true or false...
assuming the code is safe....
How do i know/test that the code loaded does not cause a compile/syntax error
Ideally i would like to check the syntax error etc before executing and log/inform the user about the error
Any ideas / pointers / help is much appreciated...
Thank you.
PS: Im a noob