MCPcopy Index your code
hub / github.com/php/frankenphp / ExecutePHPCode

Function ExecutePHPCode

cli.go:22–29  ·  view source on GitHub ↗
(phpCode string)

Source from the content-addressed store, hash-verified

20}
21
22func ExecutePHPCode(phpCode string) int {
23 // Ensure extensions are registered before CLI execution
24 registerExtensions()
25
26 cCode := C.CString(phpCode)
27 defer C.free(unsafe.Pointer(cCode))
28 return int(C.frankenphp_execute_script_cli(cCode, 0, nil, true))
29}

Callers 2

mainFunction · 0.92
cmdPHPCLIFunction · 0.92

Calls 1

registerExtensionsFunction · 0.85

Tested by

no test coverage detected