mirror of
https://github.com/laravel-ls/go-php
synced 2026-06-17 20:40:03 +02:00
Initial commit
This commit is contained in:
commit
4cbf7e62b7
19 changed files with 1295 additions and 0 deletions
18
init.go
Normal file
18
init.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue