xref: /php-src/ext/pcre/tests/pcre.constants.phpt (revision a555cc0b)
1--TEST--
2Test for pre-defined pcre constants
3--FILE--
4<?php
5
6echo "PCRE constants test\n";
7
8echo "PREG_PATTERN_ORDER= ", PREG_PATTERN_ORDER, "\n";
9echo "PREG_OFFSET_CAPTURE= ", PREG_OFFSET_CAPTURE, "\n";
10echo "PREG_SPLIT_NO_EMPTY= ", PREG_SPLIT_NO_EMPTY, "\n";
11echo "PREG_SPLIT_DELIM_CAPTURE= ", PREG_SPLIT_DELIM_CAPTURE, "\n";
12echo "PREG_SPLIT_OFFSET_CAPTURE= ", PREG_SPLIT_OFFSET_CAPTURE, "\n";
13echo "PREG_GREP_INVERT= ", PREG_GREP_INVERT, "\n";
14echo "PREG_NO_ERROR= ", PREG_NO_ERROR, "\n";
15echo "PREG_INTERNAL_ERROR= ", PREG_INTERNAL_ERROR, "\n";
16echo "PREG_BACKTRACK_LIMIT_ERROR= ", PREG_BACKTRACK_LIMIT_ERROR, "\n";
17echo "PREG_RECURSION_LIMIT_ERROR= ", PREG_RECURSION_LIMIT_ERROR, "\n";
18echo "PREG_BAD_UTF8_ERROR= ", PREG_BAD_UTF8_ERROR, "\n";
19
20?>
21--EXPECT--
22PCRE constants test
23PREG_PATTERN_ORDER= 1
24PREG_OFFSET_CAPTURE= 256
25PREG_SPLIT_NO_EMPTY= 1
26PREG_SPLIT_DELIM_CAPTURE= 2
27PREG_SPLIT_OFFSET_CAPTURE= 4
28PREG_GREP_INVERT= 1
29PREG_NO_ERROR= 0
30PREG_INTERNAL_ERROR= 1
31PREG_BACKTRACK_LIMIT_ERROR= 2
32PREG_RECURSION_LIMIT_ERROR= 3
33PREG_BAD_UTF8_ERROR= 4
34