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

1.1       misho       1: --TEST--
                      2: Test vprintf() function : basic functionality - string format
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : int vprintf(string $format , array $args)
                      6:  * Description: Output a formatted string 
                      7:  * Source code: ext/standard/formatted_print.c
                      8: */
                      9: 
                     10: echo "*** Testing vprintf() : 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: $result = vprintf($format1,$arg1);
                     23: echo "\n";
                     24: var_dump($result);
                     25: $result = vprintf($format2,$arg2);
                     26: echo "\n";
                     27: var_dump($result);
                     28: $result = vprintf($format3,$arg3);
                     29: echo "\n";
                     30: var_dump($result);
                     31: 
                     32: ?>
                     33: ===DONE===
                     34: --EXPECT--
                     35: *** Testing vprintf() : basic functionality - using string format ***
                     36: one
                     37: int(3)
                     38: one two
                     39: int(7)
                     40: one two three
                     41: int(13)
                     42: ===DONE===
                     43: 

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