1--TEST--
2Test vsprintf() function : basic functionality - bool 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
10echo "*** Testing vsprintf() : basic functionality - using bool format ***\n";
11
12// Initialise all required variables
13$format = "format";
14$format1 = "%b";
15$format2 = "%b %b";
16$format3 = "%b %b %b";
17$arg1 = array(TRUE);
18$arg2 = array(TRUE,FALSE);
19$arg3 = array(TRUE,FALSE,TRUE);
20
21var_dump( vsprintf($format1,$arg1) );
22var_dump( vsprintf($format2,$arg2) );
23var_dump( vsprintf($format3,$arg3) );
24
25echo "Done";
26?>
27--EXPECT--
28*** Testing vsprintf() : basic functionality - using bool format ***
29string(1) "1"
30string(3) "1 0"
31string(5) "1 0 1"
32Done
33