Files
archived-frankenphp/internal/testcli/main.go
Kévin Dunglas c615fe0087 feat: add experimental CLI support (#239)
* feat: add CLI support

* updated

* debug

* fix tests

* Caddy php-cli command

* use thread

* $_SERVER and input streams support

* Update frankenphp.c

Co-authored-by: Francis Lavoie <lavofr@gmail.com>

---------

Co-authored-by: Francis Lavoie <lavofr@gmail.com>
2023-10-09 14:38:15 +02:00

18 lines
232 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)
}
os.Exit(frankenphp.ExecuteScriptCLI(os.Args[1], os.Args))
}