1--TEST--
2Test ctype_graph() function : usage variations - octal and hexadecimal values
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7/*
8 * Pass octal and hexadecimal values to ctype_graph() to test behaviour
9 */
10
11echo "*** Testing ctype_graph() : usage variations ***\n";
12
13$orig = setlocale(LC_CTYPE, "C");
14
15$octal_values = array(061,  062,  063,  064);
16$hex_values = array  (0x31, 0x32, 0x33, 0x34);
17
18echo "\n-- Octal Values --\n";
19$iterator = 1;
20foreach($octal_values as $c) {
21    echo "-- Iteration $iterator --\n";
22    var_dump(ctype_graph($c));
23    $iterator++;
24}
25
26echo "\n-- Hexadecimal Values --\n";
27$iterator = 1;
28foreach($hex_values as $c) {
29    echo "-- Iteration $iterator --\n";
30    var_dump(ctype_graph($c));
31    $iterator++;
32}
33
34setlocale(LC_CTYPE, $orig);
35?>
36--EXPECT--
37*** Testing ctype_graph() : usage variations ***
38
39-- Octal Values --
40-- Iteration 1 --
41bool(true)
42-- Iteration 2 --
43bool(true)
44-- Iteration 3 --
45bool(true)
46-- Iteration 4 --
47bool(true)
48
49-- Hexadecimal Values --
50-- Iteration 1 --
51bool(true)
52-- Iteration 2 --
53bool(true)
54-- Iteration 3 --
55bool(true)
56-- Iteration 4 --
57bool(true)
58