summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-10-30 17:24:02 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-10-30 17:24:02 +0100
commitada2a55e07bb413c71d371f77a91e9454a7d564a (patch)
treeb37d229348d624701aef6b611ddf2138209d54d0 /ext
parent3e2b127e63b8f1b75235b5c9a73a02abb2b877d8 (diff)
parent904c1b6589b999a8e387215ac3c8fce9e4ab62a8 (diff)
downloadphp-git-ada2a55e07bb413c71d371f77a91e9454a7d564a.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: FIxed bug #80299
Diffstat (limited to 'ext')
-rw-r--r--ext/reflection/tests/bug80299.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug80299.phpt b/ext/reflection/tests/bug80299.phpt
new file mode 100644
index 0000000000..61aec5b1ce
--- /dev/null
+++ b/ext/reflection/tests/bug80299.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #80299: ReflectionFunction->invokeArgs confused in arguments
+--FILE--
+<?php
+
+$bar = new DateTime();
+$args = [1, &$bar];
+
+$function = function (int &$foo, DateTimeInterface &$bar) {};
+
+(new ReflectionFunction($function))->invokeArgs($args);
+
+?>
+--EXPECTF--
+Warning: {closure}(): Argument #1 ($foo) must be passed by reference, value given in %s on line %d