1--TEST-- 2Edge cases in compile-time method argument binding 3--FILE-- 4<?php 5 6class A { 7 private function method($x) {} 8} 9 10class B extends A { 11 public function test() { 12 $x = 1; 13 $this->method($x); 14 var_dump($x); 15 } 16} 17 18class C extends B { 19 public function method(&$x) { 20 ++$x; 21 } 22} 23 24(new C)->test(); 25 26class D { 27 private final function method(&$x) { 28 ++$x; 29 } 30} 31 32class E extends D { 33 public function __call($name, $args) { } 34 35 public function test() { 36 $this->method($x); 37 } 38} 39 40(new E)->test(); 41 42?> 43--EXPECTF-- 44int(2) 45 46Notice: Undefined variable: x in %s on line %d 47