summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-06-30 21:05:48 +0300
committerDmitry Stogov <dmitry@zend.com>2016-06-30 21:05:48 +0300
commit3a452426693aed93d5392cb68aff7eacd73989e3 (patch)
tree9d64923e01349c6c7d0b1f1b632fc86841b85623
parentc3667a5eed098cc106351ec032306a149509dfa3 (diff)
downloadphp-git-3a452426693aed93d5392cb68aff7eacd73989e3.tar.gz
Disable inlining for $this->foo(), because $this may be not in object context
-rw-r--r--ext/opcache/Optimizer/optimize_func_calls.c2
-rw-r--r--ext/opcache/tests/wrong_inlining_002.phpt2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c
index 0d5e4d7f3a..f4565b04a0 100644
--- a/ext/opcache/Optimizer/optimize_func_calls.c
+++ b/ext/opcache/Optimizer/optimize_func_calls.c
@@ -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;
}
diff --git a/ext/opcache/tests/wrong_inlining_002.phpt b/ext/opcache/tests/wrong_inlining_002.phpt
index e132f987e3..4e71a96d10 100644
--- a/ext/opcache/tests/wrong_inlining_002.phpt
+++ b/ext/opcache/tests/wrong_inlining_002.phpt
@@ -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