Bug #73998 [Ver->Csd]: array_key_exists fails on arrays created by get_object_vars

From: Date: Thu, 02 Feb 2017 17:43:25 +0000
Subject: Bug #73998 [Ver->Csd]: array_key_exists fails on arrays created by get_object_vars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207131@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73998&edit=1 ID: 73998 Updated by: nikic@php.net Reported by: Hauke dot Jensen at volz-software dot de Summary: array_key_exists fails on arrays created by get_object_vars -Status: Verified +Status: Closed Type: Bug Package: Arrays related Operating System: Linux PHP Version: 7.0.0 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: Fixed by http://git.php.net/?p=php-src.git;a=commitdiff;h=dd9cf23457e21d2bda29dc92d437b9dbd14027b2. Previous Comments: ------------------------------------------------------------------------ [2017-01-27 18:48:17] cmb@php.net Confirmed: <https://3v4l.org/vZbPc>. ------------------------------------------------------------------------ [2017-01-25 19:05:53] Hauke dot Jensen at volz-software dot de Description: ------------ array_key_exists fails on arrays created by get_object_vars on Objects with numeric Propertie Names. It works fine in the old PHP 5.3 enviroment. Test script: --------------- $json = '{"100308":1}'; $temp = json_decode($json); $sub = get_object_vars($temp); // Error Array var_dump($sub, array_key_exists('100308', $sub)); Expected result: ---------------- array(1) { [100308]=> int(1) } bool(true) Actual result: -------------- array(1) { ["100308"]=> int(1) } bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73998&edit=1

« previous php.bugs (#207131) next »