summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/031.phpt
blob: 91ee2f8ce4b2b3e46ecc7a0097663b0534f3c990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Nullable return type inheritance rules (non-nullable and nullable)
--FILE--
<?php
class A {
	function foo(): int {}
}
class B extends A {
	function foo(): ?int {}
}
?>
DONE
--EXPECTF--
Fatal error: Declaration of B::foo(): ?int must be compatible with A::foo(): int in %s031.php on line 7