blob: 018568adea003dd996c7be5e2ffdd1abc0518901 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--TEST--
Test edge-cases for negative num strings in interpolated string offsets
--FILE--
<?php
$a = [
"0" => 1,
"-0" => 2,
"1" => 3,
"-1" => 4,
"0x0" => 5,
"-0x0" => 6,
"00" => 7,
"-00" => 8,
"9223372036854775808" => 9,
"-9223372036854775808" => 10,
"2147483648" => 11,
"-2147483648" => 12,
];
var_dump("$a[0]");
var_dump("$a[-0]");
var_dump("$a[1]");
var_dump("$a[-1]");
var_dump("$a[0x0]");
var_dump("$a[-0x0]");
var_dump("$a[00]");
var_dump("$a[-00]");
var_dump("$a[9223372036854775808]");
var_dump("$a[-9223372036854775808]");
var_dump("$a[2147483648]");
var_dump("$a[-2147483648]");
?>
--EXPECT--
string(1) "1"
string(1) "2"
string(1) "3"
string(1) "4"
string(1) "5"
string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
string(2) "10"
string(2) "11"
string(2) "12"
|