]> granicus.if.org Git - php/commitdiff
Disable inlining for $this->foo(), because $this may be not in object context
authorDmitry Stogov <dmitry@zend.com>
Thu, 30 Jun 2016 18:05:48 +0000 (21:05 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 30 Jun 2016 18:05:48 +0000 (21:05 +0300)
ext/opcache/Optimizer/optimize_func_calls.c
ext/opcache/tests/wrong_inlining_002.phpt

index 0d5e4d7f3a83ec906db1eefea726cd3f0e5fabec..f4565b04a09106d1a52cdb8205f866821eaafc0d 100644 (file)
@@ -100,7 +100,7 @@ static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_o
 
                        if (fcall->opcode == ZEND_INIT_METHOD_CALL && fcall->op1_type == IS_UNUSED) {
                                /* TODO: we can't inlne methods, because $this may be used
-                                *       not in class context ???
+                                *       not in object context ???
                                 */
                                return;
                        }
index e132f987e30e60bf2e3ca3c3b42ef45d8bf9970b..4e71a96d10e1cc5e0bfb554eea12f22835abfa6b 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Pass result of inlined function by reference
+$this not in object context
 --INI--
 opcache.enable=1
 opcache.enable_cli=1