Annotation of embedaddon/php/ext/standard/tests/strings/vprintf_basic6.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test vprintf() function : basic functionality - exponential format
3: --FILE--
4: <?php
5: /* Prototype : string 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 exponential format ***\n";
11:
12: // Initialise all required variables
13: $format = "format";
14: $format1 = "%e";
15: $format2 = "%e %e";
16: $format3 = "%e %e %e";
17: $arg1 = array(1000);
18: $arg2 = array(1000,2000);
19: $arg3 = array(1000,2000,3000);
20:
21: $result = vprintf($format1,$arg1);
22: echo "\n";
23: var_dump($result);
24:
25: $result = vprintf($format2,$arg2);
26: echo "\n";
27: var_dump($result);
28:
29: $result = vprintf($format3,$arg3);
30: echo "\n";
31: var_dump($result);
32:
33: ?>
34: ===DONE===
35: --EXPECT--
36: *** Testing vprintf() : basic functionality - using exponential format ***
37: 1.000000e+3
38: int(11)
39: 1.000000e+3 2.000000e+3
40: int(23)
41: 1.000000e+3 2.000000e+3 3.000000e+3
42: int(35)
43: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>