Annotation of embedaddon/php/ext/ctype/tests/bug25745.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #25745 (ctype functions fail with non-ascii characters)
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
5: --FILE--
6: <?php
7: $funcs = array(
8: "ctype_alnum", "ctype_alpha", "ctype_cntrl", "ctype_digit",
9: "ctype_graph", "ctype_lower", "ctype_print", "ctype_punct",
10: "ctype_space", "ctype_upper", "ctype_xdigit"
11: );
12:
13: foreach ($funcs as $ctype_func) {
14: for ($i = 0; $i < 256; $i++) {
15: $a = $ctype_func($i);
16: $b = $ctype_func(chr($i));
17: if ($a != $b) {
18: echo "broken... $ctype_func($i) = $a, $ctype_func(chr($i)) = $b\n";
19: exit;
20: }
21: }
22: }
23: echo "ok\n";
24: ?>
25: --EXPECT--
26: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>