1--TEST--
2Test ctype_space() 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 as $c to ctype_space() to test behaviour
9 */
10
11echo "*** Testing ctype_space() : usage variations ***\n";
12
13$orig = setlocale(LC_CTYPE, "C");
14
15$octal_values = array (011, 012, 013, 014, 015, 040);
16$hex_values   = array (0x9, 0xA, 0xB, 0xC, 0xD, 0x20);
17
18echo "\n-- Octal Values --\n";
19$iterator = 1;
20foreach($octal_values as $c) {
21    echo "-- Iteration $iterator --\n";
22    var_dump(ctype_space($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_space($c));
31    $iterator++;
32}
33setlocale(LC_CTYPE, $orig);
34?>
35--EXPECT--
36*** Testing ctype_space() : usage variations ***
37
38-- Octal Values --
39-- Iteration 1 --
40bool(true)
41-- Iteration 2 --
42bool(true)
43-- Iteration 3 --
44bool(true)
45-- Iteration 4 --
46bool(true)
47-- Iteration 5 --
48bool(true)
49-- Iteration 6 --
50bool(true)
51
52-- Hexadecimal Values --
53-- Iteration 1 --
54bool(true)
55-- Iteration 2 --
56bool(true)
57-- Iteration 3 --
58bool(true)
59-- Iteration 4 --
60bool(true)
61-- Iteration 5 --
62bool(true)
63-- Iteration 6 --
64bool(true)
65