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