diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-24 10:51:51 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-24 10:51:51 +0200 |
commit | 59c4c8297bd02b9148b5111e3d5af838027c8f93 (patch) | |
tree | b9022b8eb162da547226bbad91d0d75ef8bb8159 | |
parent | d071ab19283f525212884eb8e838c2109abc2f09 (diff) | |
download | php-git-59c4c8297bd02b9148b5111e3d5af838027c8f93.tar.gz |
Add test case for previous commit
Forgot to "git add".
-rw-r--r-- | Zend/tests/recv_init_ref_type.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/recv_init_ref_type.phpt b/Zend/tests/recv_init_ref_type.phpt new file mode 100644 index 0000000000..29b96d379f --- /dev/null +++ b/Zend/tests/recv_init_ref_type.phpt @@ -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 |