1--TEST--
2Test ctype_digit() function : usage variations - different integers
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7/* Prototype  : bool ctype_digit(mixed $c)
8 * Description: Checks for numeric character(s)
9 * Source code: ext/ctype/ctype.c
10 */
11
12/*
13 * Pass different integers to ctype_digit() to test which character codes are considered
14 * valid decimal digits
15 */
16
17echo "*** Testing ctype_digit() : usage variations ***\n";
18
19$orig = setlocale(LC_CTYPE, "C");
20
21for ($i = 0; $i < 256; $i++) {
22	if (ctype_digit($i)) {
23		echo "character code $i is a numeric digit\n";
24	}
25}
26
27setlocale(LC_CTYPE, $orig);
28?>
29===DONE===
30--EXPECTF--
31*** Testing ctype_digit() : usage variations ***
32character code 48 is a numeric digit
33character code 49 is a numeric digit
34character code 50 is a numeric digit
35character code 51 is a numeric digit
36character code 52 is a numeric digit
37character code 53 is a numeric digit
38character code 54 is a numeric digit
39character code 55 is a numeric digit
40character code 56 is a numeric digit
41character code 57 is a numeric digit
42===DONE===
43