1--TEST-- 2Test ctype_upper() 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_upper() to test behaviour 9 */ 10 11echo "*** Testing ctype_upper() : usage variations ***\n"; 12$orig = setlocale(LC_CTYPE, "C"); 13 14$octal_values = array(0101, 0102, 0103, 0104); 15$hex_values = array(0x41, 0x42, 0x43, 0x44); 16 17echo "\n-- Octal Values --\n"; 18$iterator = 1; 19foreach($octal_values as $c) { 20 echo "-- Iteration $iterator --\n"; 21 var_dump(ctype_upper($c)); 22 $iterator++; 23} 24 25echo "\n-- Hexadecimal Values --\n"; 26$iterator = 1; 27foreach($hex_values as $c) { 28 echo "-- Iteration $iterator --\n"; 29 var_dump(ctype_upper($c)); 30 $iterator++; 31} 32 33setlocale(LC_CTYPE, $orig); 34?> 35--EXPECT-- 36*** Testing ctype_upper() : 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 48-- Hexadecimal Values -- 49-- Iteration 1 -- 50bool(true) 51-- Iteration 2 -- 52bool(true) 53-- Iteration 3 -- 54bool(true) 55-- Iteration 4 -- 56bool(true) 57