vprintf_basic6.phpt 756 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Test vprintf() function : basic functionality - exponential format
  3. --FILE--
  4. <?php
  5. echo "*** Testing vprintf() : basic functionality - using exponential format ***\n";
  6. // Initialise all required variables
  7. $format = "format";
  8. $format1 = "%e";
  9. $format2 = "%e %e";
  10. $format3 = "%e %e %e";
  11. $arg1 = array(1000);
  12. $arg2 = array(1000,2000);
  13. $arg3 = array(1000,2000,3000);
  14. $result = vprintf($format1,$arg1);
  15. echo "\n";
  16. var_dump($result);
  17. $result = vprintf($format2,$arg2);
  18. echo "\n";
  19. var_dump($result);
  20. $result = vprintf($format3,$arg3);
  21. echo "\n";
  22. var_dump($result);
  23. ?>
  24. --EXPECT--
  25. *** Testing vprintf() : basic functionality - using exponential format ***
  26. 1.000000e+3
  27. int(11)
  28. 1.000000e+3 2.000000e+3
  29. int(23)
  30. 1.000000e+3 2.000000e+3 3.000000e+3
  31. int(35)