Bug #73847 [Opn->Fbk]: Recursion when a variable is redefined as array
| From: | cmb@php.net | Date: | Sat, 31 Dec 2016 12:04:20 +0000 |
| Subject: | Bug #73847 [Opn->Fbk]: Recursion when a variable is redefined as array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206261@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73847&edit=1
ID: 73847
Updated by: cmb@php.net
Reported by: joyce at ennexa dot com
Summary: Recursion when a variable is redefined as array
-Status: Open
+Status: Feedback
Type: Bug
Package: Arrays related
PHP Version: 7.1.0
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I can't reproduce that: <https://3v4l.org/6p5r1>.
Please specify the exact version of PHP you're using, which
zend_extensions are enabled, and your OS.
Previous Comments:
------------------------------------------------------------------------
[2016-12-31 07:28:36] joyce at ennexa dot com
Description:
------------
Redefining a variable as an array with the old value as member causes recursion.
Test script:
---------------
<?php
$a = 23;
$a = array($a);
print_r($a);
Expected result:
----------------
Array
(
[0] => 23
)
Actual result:
--------------
Array
(
[0] => Array
*RECURSION*
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73847&edit=1