Skip to content

Commit

Permalink
Add test case for previous commit
Browse files Browse the repository at this point in the history
Forgot to "git add".
  • Loading branch information
nikic committed Jun 24, 2020
1 parent d071ab1 commit 59c4c82
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Zend/tests/recv_init_ref_type.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
Check by-ref RECV_INIT with single type
--FILE--
<?php

function test(array &$foo = []) {
}

try {
$bar = 42;
test($bar);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}

?>
--EXPECTF--
test(): Argument #1 ($foo) must be of type array, int given, called in %s on line %d

0 comments on commit 59c4c82

Please sign in to comment.