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)
| 369 | // Any other type will cause a panic. |
| 370 | // More types may be supported in the future. |
| 371 | func PHPValue(value any) unsafe.Pointer { |
| 372 | return unsafe.Pointer(phpValue(value)) |
| 373 | } |
| 374 | |
| 375 | func phpValue(value any) *C.zval { |
| 376 | zval := (*C.zval)(C.__emalloc__(C.size_t(unsafe.Sizeof(C.zval{})))) |
no test coverage detected