Re: com php-src: Implement call_user_func() and call_user_func_array() using special opcodes. In some rare cases it leads to insignificant changes in
error messages.: Zend/tests/001.phpt Zend/tests/002.phpt Zend/tests/003.phpt Zend/tests/call_user_func_004.phpt Zend/tests/call_user_func_005.phpt
Zend/tests/fr47160.phpt Zend/tests/objects_027.phpt Zend/zend_compile.c Zend/zend_execute.c Zend/zend_execute_API.c Zend/zend_vm_def.h
Zend/zend_vm_execute.h

From: Date: Thu, 24 Jul 2014 18:45:40 +0000
Subject: Re: com php-src: Implement call_user_func() and call_user_func_array() using special opcodes. In some rare cases it leads to insignificant changes in
error messages.: Zend/tests/001.phpt Zend/tests/002.phpt Zend/tests/003.phpt Zend/tests/call_user_func_004.phpt Zend/tests/call_user_func_005.phpt
Zend/tests/fr47160.phpt Zend/tests/objects_027.phpt Zend/zend_compile.c Zend/zend_execute.c Zend/zend_execute_API.c Zend/zend_vm_def.h
Zend/zend_vm_execute.h
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-79584@lists.php.net to get a copy of this message
Hi Nikita, Thanks for info. Please record this as a "known problem" at https://wiki.php.net/phpng (may be even add a PHPT for phpng). I don't think it's a real problem, but we will need to analyze all the incompatibilities and make decision about each of them - if it's a bug or unexplained behavior of PHP5. Now I remember your patch that changed FOREACH behavior. I liked the idea, just didn't like to break behavior in inphpng, but once we merge phpng into master I think we should make this break. RFC, voting, etc... we mus not explain users that PHP behavior depends on the values of reference-counters :) Thanks. Dmitry. On Thu, Jul 24, 2014 at 10:27 PM, Nikita Popov <nikita.ppv@gmail.com> wrote: > On Thu, Jul 10, 2014 at 10:32 PM, Dmitry Stogov <dmitry@php.net> wrote: > >> Commit: de306e70882dd7dd04ea952ef3c665304837c3be >> Author: Dmitry Stogov <dmitry@zend.com> Fri, 11 Jul 2014 >> 00:32:18 +0400 >> Parents: 4e291fab81eb8c7517d673705ae8a46bf178724b >> Branches: phpng >> >> Link: >> >> http://git.php.net/?p=php-src.git;a=commitdiff;h=de306e70882dd7dd04ea952ef3c665304837c3be >> >> Log: >> Implement call_user_func() and call_user_func_array() using special >> opcodes. >> In some rare cases it leads to insignificant changes in error messages. >> >> Changed paths: >> M Zend/tests/001.phpt >> M Zend/tests/002.phpt >> M Zend/tests/003.phpt >> M Zend/tests/call_user_func_004.phpt >> M Zend/tests/call_user_func_005.phpt >> M Zend/tests/fr47160.phpt >> M Zend/tests/objects_027.phpt >> M Zend/zend_compile.c >> M Zend/zend_execute.c >> M Zend/zend_execute_API.c >> M Zend/zend_vm_def.h >> M Zend/zend_vm_execute.h >> M Zend/zend_vm_opcodes.c >> M Zend/zend_vm_opcodes.h >> M ext/opcache/Optimizer/optimize_func_calls.c >> > > The following code will no longer throw the by-ref warning: > > <?php error_reporting(E_ALL); > > $i = 1; > $a = array(4, 3, 2, $i); > > var_dump(call_user_func("sort", $a)); > > Old output: > > Warning: Parameter 1 to sort() expected to be a reference, value given in > /home/nikic/dev/php-ast/t11.php on line 6 > NULL > > New output: > > bool(true) > > Reason for the change is that $a has refcount=1 in SEND_USER, so it falls > under the special allowed case. > > Don't know if this change is important, just wanted to mention it in case > you weren't aware. > > Nikita >

« previous php.cvs (#79584) next »