summaryrefslogtreecommitdiff
path: root/Zend/tests/parameter_default_values/internal_declaration_error_int.phpt
blob: c32cc9e41fbc1006b60855131bb25f8470f3a187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
The default value is an integer in the parent class method's signature.
--FILE--
<?php
class MyDateTime extends DateTime
{
    public function setTime(int $hour, int $minute, int $second = 0, bool $microsecond = false)
    {
    }
}
?>
--EXPECTF--
Fatal error: Declaration of MyDateTime::setTime(int $hour, int $minute, int $second = 0, bool $microsecond = false) must be compatible with DateTime::setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0) in %s on line %d