php-src/ext/ctype/tests/ctype_xdigit_basic.phpt
2008-03-17 09:52:02 +00:00

27 lines
584 B
PHP

--TEST--
Test ctype_xdigit() function : basic functionality
--FILE--
<?php
/* Prototype : bool ctype_xdigit(mixed $c)
* Description: Checks for character(s) representing a hexadecimal digit
* Source code: ext/ctype/ctype.c
*/
echo "*** Testing ctype_xdigit() : basic functionality ***\n";
$orig = setlocale(LC_CTYPE, "C");
$c1 = 'abcdefABCDEF0123456789';
$c2 = 'face 034';
var_dump(ctype_xdigit($c1));
var_dump(ctype_xdigit($c2));
setlocale(LC_CTYPE, $orig);
?>
===DONE===
--EXPECTF--
*** Testing ctype_xdigit() : basic functionality ***
bool(true)
bool(false)
===DONE===