Eliminate dynamic function definitions, ie create_function
|Reported by:||ScottMac||Owned by:||westi|
create_function() calls are essentially a form of eval() where the body of the functions is defined at runtime rather than compile time. This patch removes all but one of the calls within the translation code.
There are a few reasons for doing this, one is apc can't cache the results of the function definition and secondly HipHop doesn't support complex create_function definitions.
Most of the references were array_filter / array_map and replaced with a simple foreach.
Others were sorting and a callback function was added.
Change History (46)
- Component changed from General to Optimization
- Keywords needs-patch added
- Component changed from Optimization to General
- Focuses performance added
- Milestone changed from Future Release to 3.9