summaryrefslogtreecommitdiff
path: root/tests/classes/method_override_optional_arg_002.phpt
blob: 669a8ca8366917d94417420ed8da2984f6467244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Omitting optional arg in method inherited from abstract class 
--FILE--
<?php

abstract class A {
	function foo($arg = 1) {}
}

class B extends A {
	function foo() {
		echo "foo\n";
	}
}

$b = new B();
$b->foo();

?>
--EXPECTF--
Strict Standards: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
foo