1--TEST--
2Test fprintf() function (variation - 4)
3--SKIPIF--
4<?php
5$data_file = dirname(__FILE__) . '/dump.txt';
6if (!($fp = fopen($data_file, 'w'))) {
7  die('skip File dump.txt could not be created');
8}
9?>
10--FILE--
11<?php
12
13$char_variation = array( 'a', "a", 67, -67, 99 );
14
15/* creating dumping file */
16$data_file = dirname(__FILE__) . '/dump.txt';
17if (!($fp = fopen($data_file, 'wt')))
18   return;
19
20/* char type variations */
21fprintf($fp, "\n*** Testing fprintf() for chars ***\n");
22foreach( $char_variation as $char ) {
23  fprintf( $fp, "\n");
24  fprintf( $fp,"%c", $char );
25}
26
27fclose($fp);
28
29print_r(file_get_contents($data_file));
30echo "\nDone";
31
32unlink($data_file);
33
34?>
35--EXPECTF--
36*** Testing fprintf() for chars ***
37
383940C
41%s
42c
43Done
44