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

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

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