no_motd = true; parent::initialize($input, $output); } public function handle(): int { // Find php from source/php-src $file = SOURCE_PATH . '/php-src/main/php_version.h'; $result = preg_match('/#define PHP_VERSION "(\d+\.\d+\.\d+)"/', file_get_contents($file), $match); if ($result === false) { $this->output->writeln('PHP source not found, maybe you need to extract first ?'); return 1; } $this->output->writeln('' . $match[1] . ''); return 0; } }