xref: /PHP-7.1/Zend/tests/bug63336.phpt (revision e5fae779)
1--TEST--
2Bug #63336 (invalid E_NOTICE error occur)
3--FILE--
4<?php
5error_reporting(E_ALL & ~E_WARNING);
6define("TEST", "123");
7class Base {
8    const DUMMY = "XXX";
9    public function foo($var=TEST, $more=null) { return true; }
10    public function bar($more=self::DUMMY) { return true; }
11}
12
13class Child extends Base {
14    const DUMMY = "DDD";
15    public function foo($var=TEST, array $more = array()) { return true; }
16    public function bar($var, $more=self::DUMMY) { return true; }
17}
18?>
19--EXPECTF--
20Warning: Declaration of Child::foo($var = TEST, array $more = Array) should be compatible with Base::foo($var = TEST, $more = NULL) in %sbug63336.php on line %d
21
22Warning: Declaration of Child::bar($var, $more = self::DUMMY) should be compatible with Base::bar($more = self::DUMMY) in %sbug63336.php on line %d
23