--TEST-- Test vprintf() function : usage variations - char formats with non-char values --FILE-- "12twelve"), array("3"), array("4"), array("1"), array("2") ), // array of boolean data array( true, TRUE, false, TRUE, 0, FALSE, 1, true, false, TRUE, FALSE, 0, 1, 1, 0, 1, TRUE, 0, FALSE), ); // looping to test vprintf() with different char formats from the above $format array // and with non-char values from the above $args_array array $counter = 1; foreach($args_array as $args) { echo "\n-- Iteration $counter --\n"; $result = vprintf($formats, $args); echo "\n"; var_dump($result); $counter++; } ?> ===DONE=== --EXPECTF-- *** Testing vprintf() : char formats and non-char values *** -- Iteration 1 -- A %s B ] c ~ %s # %s %s %s = 2 %s B ] A %s int(64) -- Iteration 2 -- A %s B %s c ~ %s # %s %s %s = 2 %s B %s A %s int(68) -- Iteration 3 -- %c %c %c { c %s { %c %c @ %c %s %c %c %c %c { %c %c int(54) -- Iteration 4 -- %c %c %c %c c %c %c %c %c %c %c %c %c %c %c %c %c %c %c int(50) -- Iteration 5 -- %c %c %c %c c %c %c %c %c %c %c %c %c %c %c %c %c %c %c int(50) ===DONE===