exprInIsset.test 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Expressions in isset()
  2. -----
  3. <?php
  4. // This is legal.
  5. isset(($a), (($b)));
  6. // This is illegal, but not a syntax error.
  7. isset(1 + 1);
  8. -----
  9. !!php7
  10. array(
  11. 0: Stmt_Expression(
  12. expr: Expr_Isset(
  13. vars: array(
  14. 0: Expr_Variable(
  15. name: a
  16. )
  17. 1: Expr_Variable(
  18. name: b
  19. )
  20. )
  21. comments: array(
  22. 0: // This is legal.
  23. )
  24. )
  25. comments: array(
  26. 0: // This is legal.
  27. )
  28. )
  29. 1: Stmt_Expression(
  30. expr: Expr_Isset(
  31. vars: array(
  32. 0: Expr_BinaryOp_Plus(
  33. left: Scalar_LNumber(
  34. value: 1
  35. )
  36. right: Scalar_LNumber(
  37. value: 1
  38. )
  39. )
  40. )
  41. comments: array(
  42. 0: // This is illegal, but not a syntax error.
  43. )
  44. )
  45. comments: array(
  46. 0: // This is illegal, but not a syntax error.
  47. )
  48. )
  49. )