vprintf_basic8.phpt 682 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Test vprintf() function : basic functionality - octal format
  3. --FILE--
  4. <?php
  5. echo "*** Testing vprintf() : basic functionality - using octal format ***\n";
  6. // Initialise all required variables
  7. $format = "format";
  8. $format1 = "%o";
  9. $format2 = "%o %o";
  10. $format3 = "%o %o %o";
  11. $arg1 = array(021);
  12. $arg2 = array(021,0347);
  13. $arg3 = array(021,0347,0567);
  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 octal format ***
  26. 21
  27. int(2)
  28. 21 347
  29. int(6)
  30. 21 347 567
  31. int(10)