I need to add an entry to the superglobal $_SERVER-array within a PHP extension. I am quite sure that php_register_variable() will do the job, paasing key and value as arguments; but I have no idea what to pass as 3rd argument. Unfortunately documentation on this topic is rather sparse.
I need to add an entry to the superglobal $_SERVER-array within a PHP extension.
Share
This is what I normally use:
See Extension Writing Part II: Parameters, Arrays, and ZVALs for possible value types.