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

Function go_init_os_env

env.go:14–24  ·  view source on GitHub ↗

export go_init_os_env

(mainThreadEnv *C.zend_array)

Source from the content-addressed store, hash-verified

12
13//export go_init_os_env
14func go_init_os_env(mainThreadEnv *C.zend_array) {
15 fullEnv := os.Environ()
16 lengthOfEnv = len(fullEnv)
17
18 for _, envVar := range fullEnv {
19 key, val, _ := strings.Cut(envVar, "=")
20 zkey := newPersistentZendString(key)
21 zStr := newPersistentZendString(val)
22 C.__hash_update_string__(mainThreadEnv, zkey, zStr)
23 }
24}
25
26//export go_putenv
27func go_putenv(name *C.char, nameLen C.int, val *C.char, valLen C.int) C.bool {

Callers

nothing calls this directly

Calls 1

newPersistentZendStringFunction · 0.85

Tested by

no test coverage detected