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

Function PHPValue

types.go:371–373  ·  view source on GitHub ↗

EXPERIMENTAL: PHPValue converts a Go any to a PHP zval nil, bool, int, int64, float64, string, []any, and map[string]any are currently supported. Any other type will cause a panic. More types may be supported in the future.

(value any)

Source from the content-addressed store, hash-verified

369// Any other type will cause a panic.
370// More types may be supported in the future.
371func PHPValue(value any) unsafe.Pointer {
372 return unsafe.Pointer(phpValue(value))
373}
374
375func phpValue(value any) *C.zval {
376 zval := (*C.zval)(C.__emalloc__(C.size_t(unsafe.Sizeof(C.zval{}))))

Calls 1

phpValueFunction · 0.85

Tested by

no test coverage detected