2 Test vfprintf() function : error conditions (more than expected arguments)
4 Felix De Vliegher <felix.devliegher@gmail.com>
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
16 $file = 'vfprintf_error1.txt';
17 $fp = fopen( $file, "a+" );
19 echo "\n-- Testing vfprintf() function with more than expected no. of arguments --\n";
20 $format = 'string_val';
21 $args = array( 1, 2 );
24 var_dump( vfprintf( $fp, $format, $args, $extra_arg ) );
25 } catch (TypeError $e) {
26 echo $e->getMessage(), "\n";
29 var_dump( vfprintf( $fp, "Foo %d", array(6), "bar" ) );
30 } catch (TypeError $e) {
31 echo $e->getMessage(), "\n";
41 $file = 'vfprintf_error1.txt';
46 -- Testing vfprintf() function with more than expected no. of arguments --
47 Wrong parameter count for vfprintf()
48 Wrong parameter count for vfprintf()