1--TEST-- 2Test vprintf() function : basic functionality - hexadecimal format 3--FILE-- 4<?php 5/* Prototype : string vprintf(string $format , array $args) 6 * Description: Output a formatted string 7 * Source code: ext/standard/formatted_print.c 8*/ 9 10echo "*** Testing vprintf() : basic functionality - using hexadecimal format ***\n"; 11 12// Initialising different format strings 13$format = "format"; 14$format1 = "%x"; 15$format2 = "%x %x"; 16$format3 = "%x %x %x"; 17 18$format11 = "%X"; 19$format22 = "%X %X"; 20$format33 = "%X %X %X"; 21 22$arg1 = array(11); 23$arg2 = array(11,132); 24$arg3 = array(11,132,177); 25 26$result = vprintf($format1,$arg1); 27echo "\n"; 28var_dump($result); 29$result = vprintf($format11,$arg1); 30echo "\n"; 31var_dump($result); 32 33$result = vprintf($format2,$arg2); 34echo "\n"; 35var_dump($result); 36$result = vprintf($format22,$arg2); 37echo "\n"; 38var_dump($result); 39 40$result = vprintf($format3,$arg3);echo "\n"; 41var_dump($result); 42$result = vprintf($format33,$arg3); 43echo "\n"; 44var_dump($result); 45 46?> 47===DONE=== 48--EXPECT-- 49*** Testing vprintf() : basic functionality - using hexadecimal format *** 50b 51int(1) 52B 53int(1) 54b 84 55int(4) 56B 84 57int(4) 58b 84 b1 59int(7) 60B 84 B1 61int(7) 62===DONE=== 63