1--TEST-- 2Test vfprintf() function : error conditions (various conditions) 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 other strangeties --\n"; 20var_dump( vfprintf( 'foo', 'bar', array( 'baz' ) ) ); 21var_dump( vfprintf( $fp, 'Foo %$c-0202Sd', array( 2 ) ) ); 22 23// Close handle 24fclose( $fp ); 25 26?> 27===DONE=== 28--CLEAN-- 29<?php 30 31$file = 'vfprintf_test.txt'; 32unlink( $file ); 33 34?> 35--EXPECTF-- 36-- Testing vfprintf() function with other strangeties -- 37 38Warning: vfprintf() expects parameter 1 to be resource, string given in %s on line %d 39bool(false) 40 41Warning: vfprintf(): Argument number must be greater than zero in %s on line %d 42bool(false) 43===DONE=== 44