xref: /php-ast/tests/version_errors.phpt (revision 71f6a54d)
1--TEST--
2Version errors
3--FILE--
4<?php
5
6try {
7    ast\parse_code('<?php ...');
8} catch (LogicException $e) {
9    echo $e->getMessage(), "\n";
10}
11
12try {
13    ast\parse_code('<?php ...', $version=10000);
14} catch (LogicException $e) {
15    echo $e->getMessage(), "\n";
16}
17
18?>
19--EXPECTF--
20No version specified. Current version is %d. All versions (including experimental): {%d, %s}
21Unknown version 10000. Current version is %d. All versions (including experimental): {%d, %s}
22