summaryrefslogtreecommitdiff
path: root/ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt
blob: 2d418a423c004625d3ad5f7f8b2411cec84d56d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Parse errors during token_get_all() with TOKEN_PARSE flag
--SKIPIF--
<?php if (!extension_loaded("tokenizer")) print "skip"; ?>
--FILE--
<?php

try {
    token_get_all('<?php invalid code;', TOKEN_PARSE);
} catch (ParseError $e) {
    echo $e->getMessage(), PHP_EOL;
}

echo "Done";

?>
--EXPECT--
syntax error, unexpected identifier "code"
Done