1--TEST-- 2Test ctype_print() 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_print() to test behaviour 9 */ 10 11echo "*** Testing ctype_print() : usage variations ***\n"; 12 13$orig = setlocale(LC_CTYPE, "C"); 14 15$octal_values = array(040, 041, 042, 043); 16$hex_values = array (0x20, 0x21, 0x23, 0x24); 17 18echo "\n-- Octal Values --\n"; 19$iterator = 1; 20foreach($octal_values as $c) { 21 echo "-- Iteration $iterator --\n"; 22 var_dump(ctype_print($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_print($c)); 31 $iterator++; 32} 33setlocale(LC_CTYPE, $orig); 34?> 35--EXPECT-- 36*** Testing ctype_print() : 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