Implementing zval_static_p1 calls without duplicating memory and in a safe way