blob: 53b3775260efed7f2601ae8b30c4c5b0c3586674 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--TEST--
Bug #74836 (isset on zero-prefixed numeric indexes in array broken)
--FILE--
<?php
$s = "1234567890a";
$a[10] = "42";
$i = "010";
var_dump($s["10"], isset($s["10"]));
var_dump($s["010"], isset($s["010"]));
var_dump($s[$i], isset($s[$i]));
var_dump($a["10"], isset($a["10"]));
var_dump($a["010"], isset($a["010"]));
var_dump($a[$i], isset($a[$i]));
?>
--EXPECTF--
string(1) "a"
bool(true)
string(1) "a"
bool(true)
string(1) "a"
bool(true)
string(2) "42"
bool(true)
Warning: Undefined array key "010" in %s on line %d
NULL
bool(false)
Warning: Undefined array key "010" in %s on line %d
NULL
bool(false)
|