diff options
Diffstat (limited to 'ext/opcache/tests/method_call_on_literal.phpt')
-rw-r--r-- | ext/opcache/tests/method_call_on_literal.phpt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/opcache/tests/method_call_on_literal.phpt b/ext/opcache/tests/method_call_on_literal.phpt new file mode 100644 index 0000000000..bf89caa418 --- /dev/null +++ b/ext/opcache/tests/method_call_on_literal.phpt @@ -0,0 +1,14 @@ +--TEST-- +Literal compaction should take method calls on literals into account +--FILE-- +<?php + +try { + (42)->foo(); +} catch (Error $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +Call to a member function foo() on integer |