int.test 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. Different integer syntaxes
  2. -----
  3. <?php
  4. 0;
  5. 1;
  6. @@{ PHP_INT_MAX }@@;
  7. @@{ PHP_INT_MAX + 1 }@@;
  8. 0xFFF;
  9. 0xfff;
  10. 0XfFf;
  11. 0777;
  12. 0b111000111000;
  13. -----
  14. array(
  15. 0: Stmt_Expression(
  16. expr: Scalar_LNumber(
  17. value: 0
  18. )
  19. )
  20. 1: Stmt_Expression(
  21. expr: Scalar_LNumber(
  22. value: 1
  23. )
  24. )
  25. 2: Stmt_Expression(
  26. expr: Scalar_LNumber(
  27. value: @@{ PHP_INT_MAX }@@
  28. )
  29. )
  30. 3: Stmt_Expression(
  31. expr: Scalar_DNumber(
  32. value: @@{ PHP_INT_MAX + 1 }@@
  33. )
  34. )
  35. 4: Stmt_Expression(
  36. expr: Scalar_LNumber(
  37. value: 4095
  38. )
  39. )
  40. 5: Stmt_Expression(
  41. expr: Scalar_LNumber(
  42. value: 4095
  43. )
  44. )
  45. 6: Stmt_Expression(
  46. expr: Scalar_LNumber(
  47. value: 4095
  48. )
  49. )
  50. 7: Stmt_Expression(
  51. expr: Scalar_LNumber(
  52. value: 511
  53. )
  54. )
  55. 8: Stmt_Expression(
  56. expr: Scalar_LNumber(
  57. value: 3640
  58. )
  59. )
  60. )