summaryrefslogtreecommitdiff
path: root/ext/ctype/tests/ctype_digit_basic.phpt
blob: 73e127356cb73445c5f7060fa7325098e0d1e1c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Test ctype_digit() function : basic functionality
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
/* Prototype  : bool ctype_digit(mixed $c)
 * Description: Checks for numeric character(s) 
 * Source code: ext/ctype/ctype.c
 */

echo "*** Testing ctype_digit() : basic functionality ***\n";

$orig = setlocale(LC_CTYPE, "C");

$c1 = '1234';
$c2 = 'abc123';

var_dump(ctype_digit($c1));
var_dump(ctype_digit($c2));

setlocale(LC_CTYPE, $orig);
?>
===DONE===
--EXPECT--
*** Testing ctype_digit() : basic functionality ***
bool(true)
bool(false)
===DONE===