1--TEST-- 2Test vfprintf() function : basic functionality - integer format 3--FILE-- 4<?php 5/* 6 * Testing vfprintf() : basic functionality - using integer format 7*/ 8 9echo "*** Testing vfprintf() : basic functionality - using integer format ***\n"; 10 11// Initialise all required variables 12$format = "format"; 13$format1 = "%d"; 14$format2 = "%d %d"; 15$format3 = "%d %d %d"; 16$arg1 = array(111); 17$arg2 = array(111,222); 18$arg3 = array(111,222,333); 19 20/* creating dumping file */ 21$data_file = __DIR__ . '/vfprintf_basic2.txt'; 22if (!($fp = fopen($data_file, 'wt'))) 23 return; 24 25vfprintf($fp, $format1, $arg1); 26fprintf($fp, "\n"); 27 28vfprintf($fp, $format2, $arg2); 29fprintf($fp, "\n"); 30 31vfprintf($fp, $format3, $arg3); 32fprintf($fp, "\n"); 33 34fclose($fp); 35print_r(file_get_contents($data_file)); 36 37unlink($data_file); 38 39?> 40--EXPECT-- 41*** Testing vfprintf() : basic functionality - using integer format *** 42111 43111 222 44111 222 333 45