|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-23 03:24 UTC] laruence@php.net
[2015-07-23 03:24 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2015-08-04 20:54 UTC] ab@php.net
[2016-07-20 11:37 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
Description: ------------ return type are not well tested, it sometimes throw unexcepted errors while meet IS_INDIREcT or IS_REFERENCE Test script: --------------- <?php $array = array(1, 2, 3); debug_zval_dump($array); var_dump(foo()); function &foo() :string { global $array; return $array[1]; } Expected result: ---------------- no error Actual result: -------------- PHP Fatal error: Uncaught TypeError: Return value of foo() must be of the type string, unknown returned in /tmp/1.php on line 10 in /tmp/1.php:10 Stack trace: #0 /tmp/1.php(6): foo() #1 {main} thrown in /tmp/1.php on line 10