float.test 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Different float syntaxes
  2. -----
  3. <?php
  4. 0.0;
  5. 0.;
  6. .0;
  7. 0e0;
  8. 0E0;
  9. 0e+0;
  10. 0e-0;
  11. 30.20e10;
  12. 300.200e100;
  13. 1e10000;
  14. // various integer -> float overflows
  15. // (all are actually the same number, just in different representations)
  16. 18446744073709551615;
  17. 0xFFFFFFFFFFFFFFFF;
  18. 01777777777777777777777;
  19. 0177777777777777777777787;
  20. 0b1111111111111111111111111111111111111111111111111111111111111111;
  21. -----
  22. array(
  23. 0: Scalar_DNumber(
  24. value: 0
  25. )
  26. 1: Scalar_DNumber(
  27. value: 0
  28. )
  29. 2: Scalar_DNumber(
  30. value: 0
  31. )
  32. 3: Scalar_DNumber(
  33. value: 0
  34. )
  35. 4: Scalar_DNumber(
  36. value: 0
  37. )
  38. 5: Scalar_DNumber(
  39. value: 0
  40. )
  41. 6: Scalar_DNumber(
  42. value: 0
  43. )
  44. 7: Scalar_DNumber(
  45. value: 302000000000
  46. )
  47. 8: Scalar_DNumber(
  48. value: 3.002E+102
  49. )
  50. 9: Scalar_DNumber(
  51. value: INF
  52. )
  53. 10: Scalar_DNumber(
  54. value: @@{ 0xFFFFFFFFFFFFFFFF }@@
  55. )
  56. 11: Scalar_DNumber(
  57. value: @@{ 0xFFFFFFFFFFFFFFFF }@@
  58. )
  59. 12: Scalar_DNumber(
  60. value: @@{ 0xFFFFFFFFFFFFFFFF }@@
  61. )
  62. 13: Scalar_DNumber(
  63. value: @@{ 0xFFFFFFFFFFFFFFFF }@@
  64. )
  65. 14: Scalar_DNumber(
  66. value: @@{ 0xFFFFFFFFFFFFFFFF }@@
  67. )
  68. )