Change in internal call_user_function() API.

php.internals

Dmitry Stogov

10 years ago
Hi, PHP-7.0 internal call_user_function() API doesn't support function calls with preinitialised symbol tables. This just can't work in general , because values of arguments might be already initialized in CV as well as in symbol table. I propose to remove the corresponding internal API in master: 1) remove last argument of call_user_function_ex() 2) remove zend_call_info.symbol_table field https://gist.github.com/dstogov/5550827aa695ff8cb803 The tricky way was used in phpdbg only, but that code doesn't work, and should be fixed anyway. Thanks. Dmitry.

Xinchen Hui

10 years ago
Hey: On Thu, Feb 25, 2016 at 11:16 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> Hi, > > > PHP-7.0 internal call_user_function() API doesn't support function calls > with preinitialised symbol tables. > > This just can't work in general , because values of arguments might be > already initialized in CV as well as in symbol table. > > > I propose to remove the corresponding internal API in master: > > 1) remove last argument of call_user_function_ex() > > 2) remove zend_call_info.symbol_table field >
I think it's okey, (I assume this is for 7.1, right?) the value caller want to pass in should goes via arguments, which is a more reasonable way. thanks
> > > https://gist.github.com/dstogov/5550827aa695ff8cb803 > > > The tricky way was used in phpdbg only, but that code doesn't work, and > should be fixed anyway. > > > Thanks. Dmitry. >
-- Xinchen Hui @Laruence http://www.laruence.com/

Dmitry Stogov

10 years ago
On 02/28/2016 05:01 AM, Xinchen Hui wrote:
> Hey: > > On Thu, Feb 25, 2016 at 11:16 PM, Dmitry Stogov <dmitry@zend.com > <mailto:dmitry@zend.com>> wrote: > > Hi, > > > PHP-7.0 internal call_user_function() API doesn't support function > calls with preinitialised symbol tables. > > This just can't work in general , because values of arguments > might be already initialized in CV as well as in symbol table. > > > I propose to remove the corresponding internal API in master: > > 1) remove last argument of call_user_function_ex() > > 2) remove zend_call_info.symbol_table field > > I think it's okey, (I assume this is for 7.1, right?)
Of course. Even for for 7.1 Nikita suggested to keep source level compatibility for call_user_function_ex(), and I agree with him. I'll wait for Bob's response (phpdbg is, probably, the only one user if this broken feature), and then commit. Thanks. Dmitry,