asinh_variation.phpt 716 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --TEST--
  2. Test variations in usage of asinh()
  3. --INI--
  4. serialize_precision = 10
  5. --FILE--
  6. <?php
  7. /*
  8. * Function is implemented in ext/standard/math.c
  9. */
  10. //Test asinh with a different input values
  11. $values = array(23,
  12. -23,
  13. 2.345e1,
  14. -2.345e1,
  15. 0x17,
  16. 027,
  17. "23",
  18. "23.45",
  19. "2.345e1",
  20. "1000",
  21. true,
  22. false);
  23. for ($i = 0; $i < count($values); $i++) {
  24. $res = asinh($values[$i]);
  25. var_dump($res);
  26. }
  27. ?>
  28. --EXPECT--
  29. float(3.829113652)
  30. float(-3.829113652)
  31. float(3.848471992)
  32. float(-3.848471992)
  33. float(3.829113652)
  34. float(3.829113652)
  35. float(3.829113652)
  36. float(3.848471992)
  37. float(3.848471992)
  38. float(7.60090271)
  39. float(0.881373587)
  40. float(0)