mirror of
https://github.com/php/frankenphp.git
synced 2026-04-25 17:58:05 +02:00
22 lines
316 B
Go
22 lines
316 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"frankenphp.dev"
|
|
)
|
|
|
|
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))
|
|
}
|