Skip to content

Commit 59c4c82

Browse files
committed
Add test case for previous commit
Forgot to "git add".
1 parent d071ab1 commit 59c4c82

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Zend/tests/recv_init_ref_type.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Check by-ref RECV_INIT with single type
3+
--FILE--
4+
<?php
5+
6+
function test(array &$foo = []) {
7+
}
8+
9+
try {
10+
$bar = 42;
11+
test($bar);
12+
} catch (TypeError $e) {
13+
echo $e->getMessage(), "\n";
14+
}
15+
16+
?>
17+
--EXPECTF--
18+
test(): Argument #1 ($foo) must be of type array, int given, called in %s on line %d

0 commit comments

Comments
 (0)