1--TEST-- 2Test vsprintf() function : basic functionality - unsigned format 3--SKIPIF-- 4<?php 5if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); 6?> 7--FILE-- 8<?php 9/* Prototype : string vsprintf(string $format , array $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--EXPECT-- 32*** Testing vsprintf() : basic functionality - using unsigned format *** 33string(10) "4294966185" 34string(21) "4294966185 4293732729" 35string(32) "4294966185 4293732729 4292621864" 36Done 37