1--TEST-- 2Test vsprintf() function : basic functionality - hexadecimal format 3--FILE-- 4<?php 5echo "*** Testing vsprintf() : basic functionality - using hexadecimal format ***\n"; 6 7// Initialising different format strings 8$format = "format"; 9$format1 = "%x"; 10$format2 = "%x %x"; 11$format3 = "%x %x %x"; 12 13$format11 = "%X"; 14$format22 = "%X %X"; 15$format33 = "%X %X %X"; 16 17$arg1 = array(11); 18$arg2 = array(11,132); 19$arg3 = array(11,132,177); 20 21var_dump( vsprintf($format1,$arg1) ); 22var_dump( vsprintf($format11,$arg1) ); 23 24var_dump( vsprintf($format2,$arg2) ); 25var_dump( vsprintf($format22,$arg2) ); 26 27var_dump( vsprintf($format3,$arg3) ); 28var_dump( vsprintf($format33,$arg3) ); 29 30echo "Done"; 31?> 32--EXPECT-- 33*** Testing vsprintf() : basic functionality - using hexadecimal format *** 34string(1) "b" 35string(1) "B" 36string(4) "b 84" 37string(4) "B 84" 38string(7) "b 84 b1" 39string(7) "B 84 B1" 40Done 41