Annotation of embedaddon/php/ext/standard/tests/strings/vsprintf_basic1.phpt, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>