1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/strings/vprintf_basic6.phpt
2020-06-24 13:13:44 +02:00

37 lines
756 B
PHP

--TEST--
Test vprintf() function : basic functionality - exponential format
--FILE--
<?php
echo "*** Testing vprintf() : basic functionality - using exponential format ***\n";
// Initialise all required variables
$format = "format";
$format1 = "%e";
$format2 = "%e %e";
$format3 = "%e %e %e";
$arg1 = array(1000);
$arg2 = array(1000,2000);
$arg3 = array(1000,2000,3000);
$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);
?>
--EXPECT--
*** Testing vprintf() : basic functionality - using exponential format ***
1.000000e+3
int(11)
1.000000e+3 2.000000e+3
int(23)
1.000000e+3 2.000000e+3 3.000000e+3
int(35)