xref: /PHP-8.3/Zend/tests/halt_compiler2.phpt (revision a555cc0b)
1--TEST--
2__HALT_COMPILER(); 2 files
3--FILE--
4<?php
5$text = "<?php echo 'test'; var_dump(__COMPILER_HALT_OFFSET__); __HALT_COMPILER(); ?>
6hi there";
7file_put_contents(__DIR__ . '/test1.php', $text);
8$text = "<?php echo 'test2'; var_dump(__COMPILER_HALT_OFFSET__); __HALT_COMPILER(); ?>
9hi there 2";
10file_put_contents(__DIR__ . '/test2.php', $text);
11include __DIR__ . '/test1.php';
12include __DIR__ . '/test2.php';
13?>
14--CLEAN--
15<?php
16unlink(__DIR__ . '/test1.php');
17unlink(__DIR__ . '/test2.php');
18?>
19--EXPECT--
20testint(73)
21test2int(74)
22