halt_compiler2.phpt 534 B

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