summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/002.phpt
blob: 5921634553b8064b21a6e3d44ee72646cbef2e14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Returned null, expected array

--FILE--
<?php
function test1() : array {
    return null;
}

test1();

--EXPECTF--
Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, null returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
  thrown in %s on line %d