1--TEST--
2Test vsprintf() function : basic functionality - unsigned format
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6?>
7--FILE--
8<?php
9/* Prototype  : string vsprintf(string $format , aaray $args)
10 * Description: Return a formatted string
11 * Source code: ext/standard/formatted_print.c
12*/
13
14echo "*** Testing vsprintf() : basic functionality - using unsigned format ***\n";
15
16// Initialise all required variables
17$format = "format";
18$format1 = "%u";
19$format2 = "%u %u";
20$format3 = "%u %u %u";
21$arg1 = array(-1111);
22$arg2 = array(-1111,-1234567);
23$arg3 = array(-1111,-1234567,-2345432);
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 unsigned format ***
33string(20) "18446744073709550505"
34string(41) "18446744073709550505 18446744073708317049"
35string(62) "18446744073709550505 18446744073708317049 18446744073707206184"
36Done
37