summaryrefslogtreecommitdiff
path: root/ext/tokenizer
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-16 11:54:40 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-16 11:54:40 +0200
commitce972ba3493ced328f1b2ccab97f5f836f564935 (patch)
treeadf290c5ecf3b9d07df2c5e332b864d1856d2de9 /ext/tokenizer
parentc562d71d1274ad5a2685f5f1e494c650988ffe22 (diff)
parentc9acc9018629d046679fcdccabd4a4f556b87499 (diff)
downloadphp-git-ce972ba3493ced328f1b2ccab97f5f836f564935.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/tokenizer')
-rw-r--r--ext/tokenizer/tests/php_tag_only.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/tokenizer/tests/php_tag_only.phpt b/ext/tokenizer/tests/php_tag_only.phpt
new file mode 100644
index 0000000000..a6df7ded4d
--- /dev/null
+++ b/ext/tokenizer/tests/php_tag_only.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Tokenization of only the <?php tag
+--FILE--
+<?php
+
+foreach (token_get_all("<?php") as $token) {
+ echo token_name($token[0]), "\n";
+}
+echo "\n";
+foreach (token_get_all("Foobar<?php") as $token) {
+ echo token_name($token[0]), "\n";
+}
+
+?>
+--EXPECT--
+T_OPEN_TAG
+
+T_INLINE_HTML
+T_OPEN_TAG