com php-src: Merge branch 'PHP-7.0': Zend/tests/method_argume nt_binding.phpt Zend/zend_inheritance.c
| From: | Nikita Popov | Date: | Tue, 05 Jul 2016 12:34:20 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0': Zend/tests/method_argume nt_binding.phpt Zend/zend_inheritance.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92793@lists.php.net to get a copy of this message | ||
Commit: 2b46e3c71086307d462ee709929f862ba58ee010
Author: Nikita Popov <nikic@php.net> Tue, 5 Jul 2016 14:32:49 +0200
Parents: 382f6a20c995e648388fd79726e8495922eede18 8a555d7c66199c629cd4948d486ee45a8d6d412d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2b46e3c71086307d462ee709929f862ba58ee010
Log:
Merge branch 'PHP-7.0'
Changed paths:
MA Zend/tests/method_argument_binding.phpt
MM Zend/zend_inheritance.c
Diff:
diff --cc Zend/tests/method_argument_binding.phpt
index 731cc4f,0000000..dea1262
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--
+<?php
+
+class A {
+ private function method($x) {}
+}
+
+class B extends A {
+ public function test() {
+ $x = 1;
+ $this->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