xref: /PHP-7.4/Zend/tests/halt_compiler2.phpt (revision 26dfce7f)
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==DONE==
15--CLEAN--
16<?php
17unlink(__DIR__ . '/test1.php');
18unlink(__DIR__ . '/test2.php');
19?>
20--EXPECT--
21testint(73)
22test2int(74)
23==DONE==
24