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