1--TEST--
2Test vsprintf() function : basic functionality - integer format
3--FILE--
4<?php
5/* Prototype  : string vsprintf(string $format , array $args)
6 * Description: Return a formatted string
7 * Source code: ext/standard/formatted_print.c
8*/
9
10/*
11 *  Testing vsprintf() : basic functionality - using integer format
12*/
13
14echo "*** Testing vsprintf() : basic functionality - using integer format ***\n";
15
16// Initialise all required variables
17$format = "format";
18$format1 = "%d";
19$format2 = "%d %d";
20$format3 = "%d %d %d";
21$arg1 = array(111);
22$arg2 = array(111,222);
23$arg3 = array(111,222,333);
24
25var_dump( vsprintf($format1,$arg1) );
26var_dump( vsprintf($format2,$arg2) );
27var_dump( vsprintf($format3,$arg3) );
28
29echo "Done";
30?>
31--EXPECTF--
32*** Testing vsprintf() : basic functionality - using integer format ***
33string(3) "111"
34string(7) "111 222"
35string(11) "111 222 333"
36Done
37