From: Nikita Popov Date: Tue, 5 Jul 2016 12:32:49 +0000 (+0200) Subject: Merge branch 'PHP-7.0' X-Git-Tag: php-7.1.0alpha3~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b46e3c71086307d462ee709929f862ba58ee010;p=php Merge branch 'PHP-7.0' --- 2b46e3c71086307d462ee709929f862ba58ee010 diff --cc Zend/tests/method_argument_binding.phpt index 731cc4fb32,0000000000..dea12621a3 mode 100644,000000..100644 --- a/Zend/tests/method_argument_binding.phpt +++ b/Zend/tests/method_argument_binding.phpt @@@ -1,47 -1,0 +1,46 @@@ +--TEST-- +Edge cases in compile-time method argument binding +--FILE-- +method($x); + var_dump($x); + } +} + +class C extends B { + public function method(&$x) { + ++$x; + } +} + +(new C)->test(); + +class D { + private final function method(&$x) { + ++$x; + } +} + +class E extends D { + public function __call($name, $args) { } + + public function test() { + $this->method($x); + } +} + +(new E)->test(); + +?> +--EXPECTF-- - Warning: Declaration of C::method(&$x) should be compatible with A::method($x) in %s on line %d +int(2) + +Notice: Undefined variable: x in %s on line %d