1--TEST--
2Test vfprintf) function : basic functionality - hexadecimal format
3--FILE--
4<?php
5echo "*** Testing vfprintf) : basic functionality - using hexadecimal format ***\n";
6
7// Initialising different format strings
8$format = "format";
9$format1 = "%x";
10$format2 = "%x %x";
11$format3 = "%x %x %x";
12
13$format11 = "%X";
14$format22 = "%X %X";
15$format33 = "%X %X %X";
16
17$arg1 = array(11);
18$arg2 = array(11,132);
19$arg3 = array(11,132,177);
20
21/* creating dumping file */
22$data_file = __DIR__ . '/vfprintf_basic9.txt';
23if (!($fp = fopen($data_file, 'wt')))
24   return;
25
26vfprintf($fp, $format1, $arg1);
27fprintf($fp, "\n");
28vfprintf($fp, $format11, $arg1);
29fprintf($fp, "\n");
30
31vfprintf($fp, $format2, $arg2);
32fprintf($fp, "\n");
33vfprintf($fp, $format22, $arg2);
34fprintf($fp, "\n");
35
36vfprintf($fp, $format3, $arg3);
37fprintf($fp, "\n");
38vfprintf($fp, $format33, $arg3);
39fprintf($fp, "\n");
40
41fclose($fp);
42print_r(file_get_contents($data_file));
43
44unlink($data_file);
45?>
46--EXPECT--
47*** Testing vfprintf) : basic functionality - using hexadecimal format ***
48b
49B
50b 84
51B 84
52b 84 b1
53B 84 B1
54