mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-30 04:29:15 +01:00
d225555830
Running a .phar or regular PHP executable that requires and includes its own version of php-parser will cause a "cannot redeclare class" error if said executable also includes the autoloader of the current working directory.
7 lines
139 B
PHP
7 lines
139 B
PHP
<?php
|
|
|
|
if (!class_exists('PhpParser\Autoloader')) {
|
|
require __DIR__ . '/PhpParser/Autoloader.php';
|
|
}
|
|
PhpParser\Autoloader::register();
|