mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
22 lines
331 B
Go
22 lines
331 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/dunglas/frankenphp"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) <= 1 {
|
|
log.Println("Usage: testcli script.php")
|
|
os.Exit(1)
|
|
}
|
|
|
|
if len(os.Args) == 3 && os.Args[1] == "-r" {
|
|
os.Exit(frankenphp.ExecutePHPCode(os.Args[2]))
|
|
}
|
|
|
|
os.Exit(frankenphp.ExecuteScriptCLI(os.Args[1], os.Args))
|
|
}
|