xref: /PHP-5.6/ext/pcre/tests/pcre.constants.phpt (revision 1f56f22f)
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===Done===
22--EXPECT--
23PCRE constants test
24PREG_PATTERN_ORDER= 1
25PREG_OFFSET_CAPTURE= 256
26PREG_SPLIT_NO_EMPTY= 1
27PREG_SPLIT_DELIM_CAPTURE= 2
28PREG_SPLIT_OFFSET_CAPTURE= 4
29PREG_GREP_INVERT= 1
30PREG_NO_ERROR= 0
31PREG_INTERNAL_ERROR= 1
32PREG_BACKTRACK_LIMIT_ERROR= 2
33PREG_RECURSION_LIMIT_ERROR= 3
34PREG_BAD_UTF8_ERROR= 4
35===Done===