Skip to content

Commit 4ab82a8

Browse files
committed
tests
1 parent 76b02be commit 4ab82a8

File tree

3 files changed

+3
-41
lines changed

3 files changed

+3
-41
lines changed

ext/iconv/tests/eucjp2iso2022jp.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ error_reporting=2039
1111
function hexdump($str) {
1212
$len = strlen($str);
1313
for ($i = 0; $i < $len; ++$i) {
14-
printf("%02x", ord($str{$i}));
14+
printf("%02x", ord($str[$i]));
1515
}
1616
print "\n";
1717
}

ext/tokenizer/tokenizer_data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
7070
REGISTER_LONG_CONSTANT("T_BOOL_CAST", T_BOOL_CAST, CONST_CS | CONST_PERSISTENT);
7171
REGISTER_LONG_CONSTANT("T_UNSET_CAST", T_UNSET_CAST, CONST_CS | CONST_PERSISTENT);
7272
REGISTER_LONG_CONSTANT("T_POW", T_POW, CONST_CS | CONST_PERSISTENT);
73-
REGISTER_LONG_CONSTANT("T_NEW", T_NEW, CONST_CS | CONST_PERSISTENT);
7473
REGISTER_LONG_CONSTANT("T_CLONE", T_CLONE, CONST_CS | CONST_PERSISTENT);
7574
REGISTER_LONG_CONSTANT("T_ELSEIF", T_ELSEIF, CONST_CS | CONST_PERSISTENT);
7675
REGISTER_LONG_CONSTANT("T_ELSE", T_ELSE, CONST_CS | CONST_PERSISTENT);
@@ -86,6 +85,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
8685
REGISTER_LONG_CONSTANT("T_EVAL", T_EVAL, CONST_CS | CONST_PERSISTENT);
8786
REGISTER_LONG_CONSTANT("T_INC", T_INC, CONST_CS | CONST_PERSISTENT);
8887
REGISTER_LONG_CONSTANT("T_DEC", T_DEC, CONST_CS | CONST_PERSISTENT);
88+
REGISTER_LONG_CONSTANT("T_NEW", T_NEW, CONST_CS | CONST_PERSISTENT);
8989
REGISTER_LONG_CONSTANT("T_EXIT", T_EXIT, CONST_CS | CONST_PERSISTENT);
9090
REGISTER_LONG_CONSTANT("T_IF", T_IF, CONST_CS | CONST_PERSISTENT);
9191
REGISTER_LONG_CONSTANT("T_ENDIF", T_ENDIF, CONST_CS | CONST_PERSISTENT);
@@ -213,7 +213,6 @@ char *get_token_type_name(int token_type)
213213
case T_BOOL_CAST: return "T_BOOL_CAST";
214214
case T_UNSET_CAST: return "T_UNSET_CAST";
215215
case T_POW: return "T_POW";
216-
case T_NEW: return "T_NEW";
217216
case T_CLONE: return "T_CLONE";
218217
case T_ELSEIF: return "T_ELSEIF";
219218
case T_ELSE: return "T_ELSE";
@@ -229,6 +228,7 @@ char *get_token_type_name(int token_type)
229228
case T_EVAL: return "T_EVAL";
230229
case T_INC: return "T_INC";
231230
case T_DEC: return "T_DEC";
231+
case T_NEW: return "T_NEW";
232232
case T_EXIT: return "T_EXIT";
233233
case T_IF: return "T_IF";
234234
case T_ENDIF: return "T_ENDIF";

tests/strings/offsets_general.phpt

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,8 @@ var_dump(isset($string[0][0]));
1212
var_dump($string["foo"]);
1313
var_dump(isset($string["foo"]["bar"]));
1414

15-
const FOO_DEPRECATED = "BAR"{0};
16-
var_dump(FOO_DEPRECATED);
17-
var_dump([$string{0}]); // 1 notice
18-
var_dump($string{1});
19-
var_dump(isset($string{0}));
20-
var_dump(isset($string{0}{0})); // 2 notices
21-
var_dump($string{"foo"});
22-
var_dump(isset($string{"foo"}{"bar"})); // 2 notices
2315
?>
2416
--EXPECTF--
25-
26-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
27-
28-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
29-
30-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
31-
32-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
33-
34-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
35-
36-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
37-
38-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
39-
40-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
41-
42-
Deprecated: Array and string offset access syntax with curly braces is deprecated in %s line %d
4317
string(1) "B"
4418
string(1) "f"
4519
string(1) "o"
@@ -49,15 +23,3 @@ bool(true)
4923
Warning: Illegal string offset 'foo' in %s line %d
5024
string(1) "f"
5125
bool(false)
52-
string(1) "B"
53-
array(1) {
54-
[0]=>
55-
string(1) "f"
56-
}
57-
string(1) "o"
58-
bool(true)
59-
bool(true)
60-
61-
Warning: Illegal string offset 'foo' in %s line %d
62-
string(1) "f"
63-
bool(false)

0 commit comments

Comments
 (0)