File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
strings /
vprintf_basic1.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Test vprintf() function : basic functionality - string format
--FILE--
<?php
/* Prototype : int vprintf(string $format , array $args)
* Description: Output a formatted string
* Source code: ext/standard/formatted_print.c
*/
echo "*** Testing vprintf() : 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");
$result = vprintf($format1,$arg1);
echo "\n";
var_dump($result);
$result = vprintf($format2,$arg2);
echo "\n";
var_dump($result);
$result = vprintf($format3,$arg3);
echo "\n";
var_dump($result);
?>
===DONE===
--EXPECT--
*** Testing vprintf() : basic functionality - using string format ***
one
int(3)
one two
int(7)
one two three
int(13)
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>