source: src/router/php7/Zend/tests/return_types/031.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 297 bytes
Line 
1--TEST--
2Nullable return type inheritance rules (non-nullable and nullable)
3--FILE--
4<?php
5class A {
6        function foo(): int {}
7}
8class B extends A {
9        function foo(): ?int {}
10}
11?>
12DONE
13--EXPECTF--
14Fatal error: Declaration of B::foo(): ?int must be compatible with A::foo(): int in %s031.php on line 7
Note: See TracBrowser for help on using the repository browser.