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