--TEST-- Test vsprintf() 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 vsprintf() 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"; var_dump( vsprintf($formats, $args) ); $counter++; } echo "Done"; ?> --EXPECTF-- *** Testing vsprintf() : char formats and non-char values *** -- Iteration 1 -- string(50) "A ¿ B ] c ~ ‚ # Ý à Ã = 2 Ê B ] A ¿" -- Iteration 2 -- string(50) "A ¿ B © c ~ ‚ # Ý à Ã = 2 Ê B © A ¿" -- Iteration 3 -- string(50) " { c … { @ Ò { " -- Iteration 4 -- string(50) "    c              " -- Iteration 5 -- string(50) "   c        " Done