Bug #73914 [Opn->Csd]: get_object_vars issue
| From: | nikic@php.net | Date: | Wed, 11 Jan 2017 21:03:30 +0000 |
| Subject: | Bug #73914 [Opn->Csd]: get_object_vars issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206541@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73914&edit=1
ID: 73914
Updated by: nikic@php.net
Reported by: johncitak at gmail dot com
Summary: get_object_vars issue
-Status: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: linux debian jessie
PHP Version: 7.1.0
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Will be fixed in PHP 7.2 as part of https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts.
Previous Comments:
------------------------------------------------------------------------
[2017-01-11 17:58:22] johncitak at gmail dot com
Description:
------------
get_object_vars returned array is not accessible by its keys.
Test script:
---------------
$obj = new stdClass();
$obj->{"1"} = 1;
$obj->{"2"} = 2;
$vars = get_object_vars($obj);
var_dump(isset($vars[1]));
Expected result:
----------------
TRUE
Actual result:
--------------
FALSE
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73914&edit=1