1--TEST-- 2Adding an optional by-ref arg in a child method 3--FILE-- 4<?php 5 6class Test1 { 7 public function method1() { 8 $this->method2($x); 9 var_dump($x); 10 } 11 public function method2() {} 12} 13class Test2 extends Test1 { 14 public function method2(&$x = null) { 15 ++$x; 16 } 17} 18(new Test2)->method1(); 19 20?> 21--EXPECT-- 22int(1) 23