1--TEST-- 2Test vprintf() function : basic functionality - float 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 float format ***\n"; 11 12// Initialise all required variables 13 14$format = "format"; 15$format1 = "%f"; 16$format2 = "%f %f"; 17$format3 = "%f %f %f"; 18 19$format11 = "%F"; 20$format22 = "%F %F"; 21$format33 = "%F %F %F"; 22$arg1 = array(11.11); 23$arg2 = array(11.11,22.22); 24$arg3 = array(11.11,22.22,33.33); 25 26$result = vprintf($format1,$arg1); 27echo "\n"; 28var_dump($result); 29 30$result = vprintf($format11,$arg1); 31echo "\n"; 32var_dump($result); 33 34$result = vprintf($format2,$arg2); 35echo "\n"; 36var_dump($result); 37 38$result = vprintf($format22,$arg2); 39echo "\n"; 40var_dump($result); 41 42$result = vprintf($format3,$arg3); 43echo "\n"; 44var_dump($result); 45 46$result = vprintf($format33,$arg3); 47echo "\n"; 48var_dump($result); 49 50?> 51===DONE=== 52--EXPECT-- 53*** Testing vprintf() : basic functionality - using float format *** 5411.110000 55int(9) 5611.110000 57int(9) 5811.110000 22.220000 59int(19) 6011.110000 22.220000 61int(19) 6211.110000 22.220000 33.330000 63int(29) 6411.110000 22.220000 33.330000 65int(29) 66===DONE=== 67