1

Topic: From eval to include

I noticed that PunBB uses eval() for extension hooks. Would it be better for performance to save code to file and include them. This would be better for PHP cachers and optimisers as they don't work on dynamic code.

2

Re: From eval to include

It might be faster, but also more difficult to maintain.

3

Re: From eval to include

I haven't studied the PunBB source but in theory it should be fairly straightforward. Instead of saving and reading code from a dynamically generated PHP array it would be written to file with a unique path name.