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