summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/031.phpt
blob: 6d0b71b23ba12f006031ad11d945470db2f1bef9 (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