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

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

test1();

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