1--TEST--
2Test ctype_cntrl() function : usage variations - different integers
3--EXTENSIONS--
4ctype
5--FILE--
6<?php
7/*
8 * Pass different integers to ctype_cntrl() to test which character codes are considered
9 * valid control characters
10 */
11
12echo "*** Testing ctype_cntrl() : usage variations ***\n";
13
14$orig = setlocale(LC_CTYPE, "C");
15
16for ($i = 0; $i < 256; $i++) {
17    if (ctype_cntrl(chr($i))) {
18        echo "character code $i is control character\n";
19    }
20}
21
22setlocale(LC_CTYPE, $orig);
23?>
24--EXPECT--
25*** Testing ctype_cntrl() : usage variations ***
26character code 0 is control character
27character code 1 is control character
28character code 2 is control character
29character code 3 is control character
30character code 4 is control character
31character code 5 is control character
32character code 6 is control character
33character code 7 is control character
34character code 8 is control character
35character code 9 is control character
36character code 10 is control character
37character code 11 is control character
38character code 12 is control character
39character code 13 is control character
40character code 14 is control character
41character code 15 is control character
42character code 16 is control character
43character code 17 is control character
44character code 18 is control character
45character code 19 is control character
46character code 20 is control character
47character code 21 is control character
48character code 22 is control character
49character code 23 is control character
50character code 24 is control character
51character code 25 is control character
52character code 26 is control character
53character code 27 is control character
54character code 28 is control character
55character code 29 is control character
56character code 30 is control character
57character code 31 is control character
58character code 127 is control character
59