<?php class ACommandThatCanWerkStatically { public function __construct( public string $template ) {} public function execute(Dictionary $nameToReplacementMap): string {} public static function execute(string $template, Dictionary $nameToReplacementMap): string {} } $template = new ACommandThatCanWerkStatically('@@@VERSION@@@'); echo ACommandThatCanWerkStatically::execute( $template->template, $nameToReplacementMap = array('VERSION' => '0.0.1-alpha0') ), "\n"; echo $template->execute($nameToReplacementMap), "\n";
You have javascript disabled. You will not be able to edit any code.