On the PHP 10.0 Blog, Stas talks more about inlining in PHP functions - some of the bad things this time (see here and here for other comments), including things that could break an application if not handled correctly.
Performance benefits from inlining simple functions might be significant, since function call in PHP is not cheap. We'd have some potential problems there.
Included in the list are things like:
- Variable scoping - we don't want function variables to mess with our scope, so we'd probably rename them or something.
- Then we might get a problem if function messing with current scope is called indirectly so we can't really know.
- And then some may use end-of-scope for destruction of variables that have dtors, so when we'd clean up these variables?