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