php-src/ext/tokenizer/no_inline_html_split.phpt
Nikita Popov 0d568b9fd5 Don't split T_INLINE_HTML at partial PHP tag
If <?php occurs without required trailing whitespace, we should keep
it as part of a single T_INLINE_HTML region.
2019-07-12 17:22:11 +02:00

24 lines
289 B
PHP

--TEST--
Inline HTML should not be split at partial PHP tags
--INI--
short_open_tag=0
--FILE--
<?php
var_dump(token_get_all(<<<'PHP'
Foo<?phpBar
PHP));
?>
--EXPECTF--
array(1) {
[0]=>
array(3) {
[0]=>
int(%d)
[1]=>
string(11) "Foo<?phpBar"
[2]=>
int(1)
}
}