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

1.1       misho       1: --TEST--
                      2: Test vprintf() function : basic functionality - hexadecimal 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 hexadecimal format ***\n";
                     11: 
                     12: // Initialising different format strings
                     13: $format = "format";
                     14: $format1 = "%x";
                     15: $format2 = "%x %x";
                     16: $format3 = "%x %x %x";
                     17: 
                     18: $format11 = "%X";
                     19: $format22 = "%X %X";
                     20: $format33 = "%X %X %X";
                     21: 
                     22: $arg1 = array(11);
                     23: $arg2 = array(11,132);
                     24: $arg3 = array(11,132,177);
                     25: 
                     26: $result = vprintf($format1,$arg1);
                     27: echo "\n";
                     28: var_dump($result);
                     29: $result = vprintf($format11,$arg1);
                     30: echo "\n";
                     31: var_dump($result);
                     32: 
                     33: $result = vprintf($format2,$arg2);
                     34: echo "\n";
                     35: var_dump($result);
                     36: $result = vprintf($format22,$arg2);
                     37: echo "\n";
                     38: var_dump($result);
                     39: 
                     40: $result = vprintf($format3,$arg3);echo "\n";
                     41: var_dump($result);
                     42: $result = vprintf($format33,$arg3);
                     43: echo "\n";
                     44: var_dump($result);
                     45: 
                     46: ?>
                     47: ===DONE===
                     48: --EXPECT--
                     49: *** Testing vprintf() : basic functionality - using hexadecimal format ***
                     50: b
                     51: int(1)
                     52: B
                     53: int(1)
                     54: b 84
                     55: int(4)
                     56: B 84
                     57: int(4)
                     58: b 84 b1
                     59: int(7)
                     60: B 84 B1
                     61: int(7)
                     62: ===DONE===

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