source: src/router/php7/Zend/tests/type_declarations/nullable_typed_return_without_value.phpt @ 31874

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

update php

File size: 290 bytes
Line 
1--TEST--
2Nullable typed return without value generates friendlier error message
3--FILE--
4<?php
5
6function test() : ?int {
7    return;
8}
9
10test();
11
12?>
13--EXPECTF--
14Fatal error: A function with return type must return a value (did you mean "return null;" instead of "return;"?) in %s on line %d
Note: See TracBrowser for help on using the repository browser.