2
Test vfprintf() function : basic functionality - char format
5
/* Prototype : int vfprintf ( resource $handle , string $format , array $args )
6
* Description: Write a formatted string to a stream
7
* Source code: ext/standard/formatted_print.c
10
echo "*** Testing vfprintf() : basic functionality - using char format ***\n";
12
// Initialise all required variables
16
$format3 = "%c %c %c";
19
$arg3 = array(65,66,67);
21
/* creating dumping file */
22
$data_file = dirname(__FILE__) . '/dump.txt';
23
if (!($fp = fopen($data_file, 'wt')))
26
vfprintf($fp, $format1,$arg1);
29
vfprintf($fp, $format2,$arg2);
32
vfprintf($fp, $format3,$arg3);
36
print_r(file_get_contents($data_file));
42
*** Testing vfprintf() : basic functionality - using char format ***