php-src/ext/standard/tests/strings/vsprintf_basic1.phpt
Steph Fox 87fac43ac0 - killed off UEXPECT
- html_translation_table and setlocale tests are no longer relevant
- there are a number of ANSI-encoded files. Is this deliberate?
2008-05-27 10:50:48 +00:00

34 lines
814 B
PHP

--TEST--
Test vsprintf() function : basic functionality - string format
--FILE--
<?php
/* Prototype : string vsprintf(string $format , array $args)
* Description: Return a formatted string
* Source code: ext/standard/formatted_print.c
*/
echo "*** Testing vsprintf() : basic functionality - using string format ***\n";
// Initialise all required variables
$format = "format";
$format1 = "%s";
$format2 = "%s %s";
$format3 = "%s %s %s";
$arg1 = array("one");
$arg2 = array("one","two");
$arg3 = array("one","two","three");
var_dump( vsprintf($format1,$arg1) );
var_dump( vsprintf($format2,$arg2) );
var_dump( vsprintf($format3,$arg3) );
echo "Done";
?>
--EXPECT--
*** Testing vsprintf() : basic functionality - using string format ***
unicode(3) "one"
unicode(7) "one two"
unicode(13) "one two three"
Done