com php-src: Behavoir of func_get_arg() and func_ get_args() was changed in PHP7. Now they show current values of variables corresponded to passed
arguments instead of originally passed va lues.: tests/lang/func_get_arg.001.phpt t ests/lang/func_get_args.004.phpt
| From: | Dmitry Stogov | Date: | Fri, 15 Aug 2014 07:39:50 +0000 |
| Subject: | com php-src: Behavoir of func_get_arg() and func_ get_args() was changed in PHP7. Now they show current values of variables corresponded to passed arguments instead of originally passed va lues.: tests/lang/func_get_arg.001.phpt t ests/lang/func_get_args.004.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80212@lists.php.net to get a copy of this message | ||
Commit: 3bd32efb3e2baaaac5b339ca51d9046aade1734f
Author: Dmitry Stogov <dmitry@zend.com> Fri, 15 Aug 2014 11:39:50 +0400
Parents: 0d57a7bf34a52618c0b5d3679a522a818b5adcf3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3bd32efb3e2baaaac5b339ca51d9046aade1734f
Log:
Behavoir of func_get_arg() and func_get_args() was changed in PHP7.
Now they show current values of variables corresponded to passed arguments instead of originally
passed values.
Changed paths:
M tests/lang/func_get_arg.001.phpt
M tests/lang/func_get_args.004.phpt
Diff:
diff --git a/tests/lang/func_get_arg.001..phpt b/tests/lang/func_get_arg.001.phpt
index b1bbb18..00315b0 100644
--- a/tests/lang/func_get_arg.001.phpt
+++ b/tests/lang/func_get_arg.001.phpt
@@ -1,5 +1,5 @@
--TEST--
-func_get_arg test
+func_get_arg test (PHP7)
--FILE--
<?php
@@ -12,4 +12,4 @@ foo(2);
echo "\n";
?>
--EXPECT--
-2
\ No newline at end of file
+5
\ No newline at end of file
diff --git a/tests/lang/func_get_args.004.phpt b/tests/lang/func_get_args.004.phpt
index 84e3ebe..384d99a 100644
--- a/tests/lang/func_get_args.004.phpt
+++ b/tests/lang/func_get_args.004.phpt
@@ -1,5 +1,5 @@
--TEST--
-Pass same variable by ref and by value.
+Pass same variable by ref and by value (PHP7).
--FILE--
<?php
function valRef($x, &$y) {
@@ -42,7 +42,7 @@ array(2) {
}
array(2) {
[0]=>
- string(10) "original.a"
+ string(9) "changed.x"
[1]=>
string(9) "changed.y"
}
@@ -62,6 +62,6 @@ array(2) {
[0]=>
string(9) "changed.x"
[1]=>
- string(10) "original.b"
+ string(9) "changed.y"
}
-string(9) "changed.x"
\ No newline at end of file
+string(9) "changed.x"