Bug #74836 [Opn->Asn]: isset on zero-prefixed numeric indexes in array broken
Edit report at https://bugs.php.net/bug.php?id=74836&edit=1
ID: 74836
Updated by: bwoebi@php.net
Reported by: sjon at hortensius dot net
Summary: isset on zero-prefixed numeric indexes in array
broken
-Status: Open
+Status: Assigned
Type: Bug
Package: Arrays related
Operating System: 3v4l.org
PHP Version: 7.2.0alpha2
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Related: http://git.php.net/?p=php-src.git;a=commitdiff;h=8fe47a47cf30eb3bf50a5cdb4e07f6fa135d21c7
Assigning to Dmitry, the commits author.
Previous Comments:
------------------------------------------------------------------------
[2017-06-30 13:46:55] sjon at hortensius dot net
Description:
------------
there seems to be bug when using quoted numeric indexes combined with isset(). It works without the
(redundant) 0 prefix: https://3v4l.org/NQvXb
Test script:
---------------
See https://3v4l.org/3fXr6
<?php
$a = "1234567890a";
var_dump($a["010"], isset($a["010"])); // true
Expected result:
----------------
string(1) "a"
bool(true)
Actual result:
--------------
string(1) "a"
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74836&edit=1
Thread (4 messages)