1--TEST-- 2Method override allows optional default argument 3--SKIPIF-- 4<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> 5--FILE-- 6<?php 7 8class A { 9 function foo($arg1 = 1) { 10 } 11} 12 13class B extends A { 14 function foo($arg1 = 2, $arg2 = 3) { 15 var_dump($arg1); 16 var_dump($arg2); 17 } 18} 19 20class C extends A { 21 function foo() { 22 } 23} 24 25$b = new B(); 26 27$b->foo(1); 28 29?> 30--EXPECTF-- 31Strict Standards: Declaration of C::foo() should be compatible with A::foo($arg1 = 1) in %s on line %d 32int(1) 33int(3) 34