Slide 50
Slide 50 text
50
PHP Parser - parseArgs()
default:
if (preg_match('/^--version=(.*)$/', $arg, $matches)) {
$attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]);
} elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) {
showHelp("Invalid operation $arg.");
} else {
$files[] = $arg;
}
https://github.com/nikic/PHP-Parser/blob/46be4560c4cd4bab2b74882c0da39a4548a5cfbe/bin/php-parse