1--TEST--
2Test vfprintf() function : error conditions (less than expected arguments)
3--CREDITS--
4Felix De Vliegher <felix.devliegher@gmail.com>
5--INI--
6precision=14
7--FILE--
8<?php
9/* Prototype  : int vfprintf(resource stream, string format, array args)
10 * Description: Output a formatted string into a stream
11 * Source code: ext/standard/formatted_print.c
12 * Alias to functions:
13 */
14
15// Open handle
16$file = 'vfprintf_test.txt';
17$fp = fopen( $file, "a+" );
18
19echo "\n-- Testing vfprintf() function with less than expected no. of arguments --\n";
20$format = 'string_val';
21var_dump( vfprintf($fp, $format) );
22var_dump( vfprintf( $fp ) );
23var_dump( vfprintf() );
24
25// Close handle
26fclose($fp);
27
28?>
29===DONE===
30--CLEAN--
31<?php
32
33$file = 'vfprintf_test.txt';
34unlink( $file );
35
36?>
37--EXPECTF--
38-- Testing vfprintf() function with less than expected no. of arguments --
39
40Warning: Wrong parameter count for vfprintf() in %s on line %d
41NULL
42
43Warning: Wrong parameter count for vfprintf() in %s on line %d
44NULL
45
46Warning: Wrong parameter count for vfprintf() in %s on line %d
47NULL
48===DONE===
49