Annotation of embedaddon/php/ext/ctype/tests/ctype_space_variation2.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test ctype_space() function : usage variations - different integers
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
5: --FILE--
6: <?php
7: /* Prototype : bool ctype_space(mixed $c)
8: * Description: Checks for whitespace character(s)
9: * Source code: ext/ctype/ctype.c
10: */
11:
12: /*
13: * Pass different integers to ctype_space() to test which character codes are considered
14: * valid whitespace characters
15: */
16:
17: echo "*** Testing ctype_space() : usage variations ***\n";
18:
19: $orig = setlocale(LC_CTYPE, "C");
20:
21: for ($c = 1; $c < 256; $c++) {
22: if (ctype_space($c)) {
23: echo "character code $c is a space character\n";
24: }
25: }
26: setlocale(LC_CTYPE, $orig);
27: ?>
28: ===DONE===
29: --EXPECTF--
30: *** Testing ctype_space() : usage variations ***
31: character code 9 is a space character
32: character code 10 is a space character
33: character code 11 is a space character
34: character code 12 is a space character
35: character code 13 is a space character
36: character code 32 is a space character
37: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>