mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
27 lines
584 B
Plaintext
27 lines
584 B
Plaintext
|
--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===
|