========================
Booleans
========================

<?php
True;
true;
TRUE;
false;
False;
FALSE;
?>

---

(program
  (php_tag)
  (expression_statement (boolean))
  (expression_statement (boolean))
  (expression_statement (boolean))
  (expression_statement (boolean))
  (expression_statement (boolean))
  (expression_statement (boolean))
  (text_interpolation))

==========================
Floats
==========================

<?php

1.0;
1E432;
1.0E-3432;
1423.0E3432;
.5;
6.674_083e11;
107_925_284.88;

---

(program
  (php_tag)
  (expression_statement (float))
  (expression_statement (float))
  (expression_statement (float))
  (expression_statement (float))
  (expression_statement (float))
  (expression_statement (float))
  (expression_statement (float))
)

==========================
Integers
==========================

<?php

1234;
1_234_456;
0123;
0123_456;
0x1A;
0x1A_2B_3C;
0b111111111;
0b1111_1111_1111;
0o123;

---

(program
  (php_tag)
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
  (expression_statement (integer))
)

============================
Testing string scanner confirmance
==============================

<?php echo "\"\t\\'" . '\n\\\'a\\\b\\' ?>

---

(program
  (php_tag)
  (echo_statement (binary_expression (encapsed_string (escape_sequence) (escape_sequence) (escape_sequence) (string)) (string)))
  (text_interpolation))

==========================
Shell command
==========================
<?php
`ls -la`;
`ls`;

---

(program
  (php_tag)
  (expression_statement (shell_command_expression))
  (expression_statement (shell_command_expression)))


==========================
Heredocs
==========================

<?php

<<<HERE
foo #{bar} HERE;

<<<HERE
foo #{bar}
HERE;

?>

<?php

<<<HERE
foo #{bar} HERE;

<<<HERE
foo #{bar}
HERE;

<<<  HERE
foo #{bar}
HERE;

// Allow Heredoc as function argument
read(<<<  HERE
foo #{bar}
HERE);

read(<<<  HERE
foo #{bar}
HERE , true);

---
(program
  (php_tag)
  (expression_statement (heredoc))
  (expression_statement (heredoc))
  (text_interpolation (php_tag))
  (expression_statement (heredoc))
  (expression_statement (heredoc))
  (expression_statement (heredoc))
  (comment)
  (expression_statement
    (function_call_expression
      (name)
      (arguments (argument (heredoc)))
    )
  )
  (expression_statement
    (function_call_expression
      (name)
      (arguments
        (argument (heredoc))
        (argument (boolean))
      )
    )
  )
)

==========================
Nowdocs
==========================

<?php

<<<'PHP'
<?php echo phpversion().PHP_SAPI;
PHP

?>

---

(program
  (php_tag)
  (expression_statement (heredoc))
  (text_interpolation))

==============================
Unicode escape sequences
==============================

<?php

"\u{61}"; // ASCII "a" - characters below U+007F just encode as ASCII, as it's UTF-8
"\u{FF}"; // y with diaeresis
"\u{ff}"; // case-insensitive
"\u{2603}"; // Unicode snowman
"\u{1F602}"; // FACE WITH TEARS OF JOY emoji
"\u{0000001F602}"; // Leading zeroes permitted

---

(program
  (php_tag)
  (expression_statement (encapsed_string (escape_sequence))) (comment)
  (expression_statement (encapsed_string (escape_sequence))) (comment)
  (expression_statement (encapsed_string (escape_sequence))) (comment)
  (expression_statement (encapsed_string (escape_sequence))) (comment)
  (expression_statement (encapsed_string (escape_sequence))) (comment)
  (expression_statement (encapsed_string (escape_sequence))) (comment))
