1--TEST--
2Test vfprintf() function : basic functionality - octal format
3--FILE--
4<?php
5echo "*** Testing vfprintf() : basic functionality - using octal format ***\n";
6
7// Initialise all required variables
8$format = "format";
9$format1 = "%o";
10$format2 = "%o %o";
11$format3 = "%o %o %o";
12$arg1 = array(021);
13$arg2 = array(021,0347);
14$arg3 = array(021,0347,0567);
15
16/* creating dumping file */
17$data_file = __DIR__ . '/vfprintf_basic8.txt';
18if (!($fp = fopen($data_file, 'wt')))
19   return;
20
21vfprintf($fp, $format1,$arg1);
22fprintf($fp, "\n");
23
24vfprintf($fp, $format2,$arg2);
25fprintf($fp, "\n");
26
27vfprintf($fp, $format3,$arg3);
28fprintf($fp, "\n");
29
30fclose($fp);
31print_r(file_get_contents($data_file));
32
33unlink($data_file);
34?>
35--EXPECT--
36*** Testing vfprintf() : basic functionality - using octal format ***
3721
3821 347
3921 347 567
40