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'; if (!file_exists($file)) { $this->output->writeln('PHP source not found, maybe you need to extract first ?'); return static::FAILURE; } $result = preg_match('/#define PHP_VERSION "([^"]+)"/', file_get_contents($file), $match); if ($result === false) { $this->output->writeln('PHP source not found, maybe you need to extract first ?'); return static::FAILURE; } $this->output->writeln('' . $match[1] . ''); return static::SUCCESS; } }