com php-src: Add check for maintaining reference all the way through both type and return values: Zend/tests/return_types/return_refe
rence_separation.phpt

From: Date: Thu, 19 Mar 2015 21:51:19 +0000
Subject: com php-src: Add check for maintaining reference all the way through both type and return values: Zend/tests/return_types/return_refe
rence_separation.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85681@lists.php.net to get a copy of this message
Commit: 8c76c331a5c2f64da7ddf87a0aa85641d1502e08 Author: Anthony Ferrara <ircmaxell@gmail.com> Thu, 19 Mar 2015 17:51:19 -0400 Parents: 2e4401512f99eed2d90901cdcebe74ae3c1edcd4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8c76c331a5c2f64da7ddf87a0aa85641d1502e08 Log: Add check for maintaining reference all the way through both type and return values Changed paths: M Zend/tests/return_types/return_reference_separation.phpt Diff: diff --git a/Zend/tests/return_types/return_reference_separation.phpt b/Zend/tests/return_types/return_reference_separation.phpt index 62dafed..2ec0939 100644 --- a/Zend/tests/return_types/return_reference_separation.phpt +++ b/Zend/tests/return_types/return_reference_separation.phpt @@ -11,16 +11,24 @@ function &test2(int $abc) : string { return $abc; } +function &test3(int &$abc) : string { + return $abc; +} + $a = 123; var_dump(test1($a)); var_dump($a); var_dump(test2($a)); var_dump($a); +var_dump(test3($a)); +var_dump($a); ?> --EXPECTF-- string(3) "123" int(123) string(3) "123" -int(123) \ No newline at end of file +int(123) +string(3) "123" +string(3) "123" \ No newline at end of file

« previous php.cvs (#85681) next »