mirror of
https://github.com/laravel-ls/go-php
synced 2026-06-16 03:54:55 +02:00
18 lines
458 B
Go
18 lines
458 B
Go
package php
|
|
|
|
// #cgo CFLAGS: -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM
|
|
// #cgo CFLAGS: -I/usr/include/php/Zend
|
|
// #cgo LDFLAGS: -ldl -lm -lcurl -lpcre -lssl -lcrypto -lresolv -ledit -lz -lxml2 -lphp
|
|
// #cgo linux CFLAGS: -D_GNU_SOURCE
|
|
// #include <sapi/embed/php_embed.h>
|
|
import "C"
|
|
|
|
// Init - Initialize the engine
|
|
func Init() {
|
|
C.php_embed_init(0, nil)
|
|
}
|
|
|
|
// Exit - Uninitialize the engine
|
|
func Exit() {
|
|
C.php_embed_shutdown()
|
|
}
|