compile_file() final public method

@param string $file File path
final public compile_file ( string $file, boolean $safe = FALSE, $context = [] ) : Generated
$file string
$safe boolean Whether or not add check if the function is already defined @return Generated PHP code
return Generated
Beispiel #1
0
 static final function main_cli()
 {
     $argv = $GLOBALS['argv'];
     $haanga = new Haanga_Compiler();
     $code = $haanga->compile_file($argv[1], TRUE);
     if (!isset($argv[2]) || $argv[2] != '--notags') {
         $code = "<?php\n\n{$code}";
     }
     echo $code;
 }