taoso · GitHub

There is one major problem with this patch: It needs to support callstacks involving internal functions. You do only back up EG(vm_stack). But what about a call of array_map() in the callstack? Or similar functions involving nested execute_ex() calls. (or even a custom executor where zend_execute_ex() will be called recursively for every nesting level)

That's the main complication in the whole idea - and that's why we do not implement that yet. If you have a solution for this (i.e. backing part of the C call stack up, restoring it etc. when necessary) and it being stable under all conditions, I'm fine with moving forward with this. - And no, throwing is not an option under these circumstances. It just may happen too often and subtly.

Read the original on github.com ↗