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