1--TEST--
2Test ctype_lower() function : usage variations - octal and hexadecimal values
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7/* Prototype  : bool ctype_lower(mixed $c)
8 * Description: Checks for lowercase character(s)
9 * Source code: ext/ctype/ctype.c
10 */
11
12/*
13 * Pass octal and hexadecimal values to ctype_lower() to test behaviour
14 */
15
16echo "*** Testing ctype_lower() : usage variations ***\n";
17
18$orig = setlocale(LC_CTYPE, "C");
19
20$octal_values = array(0141, 0142, 0143, 0144);
21$hex_values = array  (0x61, 0x62, 0x63, 0x64);
22
23echo "\n-- Octal Values --\n";
24$iterator = 1;
25foreach($octal_values as $c) {
26	echo "-- Iteration $iterator --\n";
27	var_dump(ctype_lower($c));
28	$iterator++;
29}
30
31echo "\n-- Hexadecimal Values --\n";
32$iterator = 1;
33foreach($hex_values as $c) {
34	echo "-- Iteration $iterator --\n";
35	var_dump(ctype_lower($c));
36	$iterator++;
37}
38
39setlocale(LC_CTYPE, $orig);
40?>
41===DONE===
42--EXPECT--
43*** Testing ctype_lower() : usage variations ***
44
45-- Octal Values --
46-- Iteration 1 --
47bool(true)
48-- Iteration 2 --
49bool(true)
50-- Iteration 3 --
51bool(true)
52-- Iteration 4 --
53bool(true)
54
55-- Hexadecimal Values --
56-- Iteration 1 --
57bool(true)
58-- Iteration 2 --
59bool(true)
60-- Iteration 3 --
61bool(true)
62-- Iteration 4 --
63bool(true)
64===DONE===
65