source: src/router/php7/Zend/tests/nullable_types/covariant_nullable_param_fails.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 304 bytes
Line 
1--TEST--
2Subtype cannot remove nullable parameter (covariance)
3
4--FILE--
5<?php
6
7interface A {
8    function method(?int $p);
9}
10
11class B implements A {
12    function method(int $p) { }
13}
14
15--EXPECTF--
16Fatal error: Declaration of B::method(int $p) must be compatible with A::method(?int $p) in %s on line %d
17
Note: See TracBrowser for help on using the repository browser.