php-parse 645 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env php
  2. <?php
  3. /**
  4. * Proxy PHP file generated by Composer
  5. *
  6. * This file includes the referenced bin path (../nikic/php-parser/bin/php-parse) using eval to remove the shebang if present
  7. *
  8. * @generated
  9. */
  10. $binPath = realpath(__DIR__ . "/" . '../nikic/php-parser/bin/php-parse');
  11. $contents = file_get_contents($binPath);
  12. $contents = preg_replace('{^#!/.+\r?\n<\?(php)?}', '', $contents, 1, $replaced);
  13. if ($replaced) {
  14. $contents = strtr($contents, array(
  15. '__FILE__' => var_export($binPath, true),
  16. '__DIR__' => var_export(dirname($binPath), true),
  17. ));
  18. eval($contents);
  19. exit(0);
  20. }
  21. include $binPath;