summaryrefslogtreecommitdiff
path: root/ext/ctype/tests/ctype_punct_basic.phpt
blob: 93fff2178373d8189550d3e462846a9a34d4da22 (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
--TEST--
Test ctype_punct() function : basic functionality
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
/* Prototype  : bool ctype_punct(mixed $c)
 * Description: Checks for any printable character which is not whitespace
 * or an alphanumeric character
 * Source code: ext/ctype/ctype.c
 */

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

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

$c1 = '@!$*';
$c2 = 'hello, world!';

var_dump(ctype_punct($c1));
var_dump(ctype_punct($c2));

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