12345678910111213141516171819202122232425262728 |
- --TEST--
- Test vsprintf() function : basic functionality - string format
- --FILE--
- <?php
- echo "*** Testing vsprintf() : basic functionality - using string format ***\n";
- // Initialise all required variables
- $format = "format";
- $format1 = "%s";
- $format2 = "%s %s";
- $format3 = "%s %s %s";
- $arg1 = array("one");
- $arg2 = array("one","two");
- $arg3 = array("one","two","three");
- var_dump( vsprintf($format1,$arg1) );
- var_dump( vsprintf($format2,$arg2) );
- var_dump( vsprintf($format3,$arg3) );
- echo "Done";
- ?>
- --EXPECT--
- *** Testing vsprintf() : basic functionality - using string format ***
- string(3) "one"
- string(7) "one two"
- string(13) "one two three"
- Done
|