PHP has an execution model that's /really/ bad for per-process requests. Even attempting to grab the parent pid is probably not sufficient as you can have execution contexts with no parent (ex: running php from cron).
I think a caching daemon would be good option for PHP, but it does add a level of complexity.
Another option would be to add EnvKey support to confd (or similar project), and provide config and template files that write the env vars to Apache and Nginx configs, and reload when they change.
Though neither confd or a daemon would work for PHP sites that use a PaaS or shared hosting, which I think is a large percentage of the market for PHP.
Using one of the existing PHP caching solutions (like opcache) might be an option.
I think having a daemon running on the OS that only syncs with an explicit ‘service envkey reload’ would work well.
If running php with nginx (via php-fpm), it’s still common for worker processes to come and go rather frequently. Imo, per-request pricing just won’t work well with php.
I would love to use your product, btw. Congratulations on launch.
On linux you can get the master process through posix-getppid (http://php.net/manual/en/function.posix-getppid.php) but this won't work on windows and has the same limitations as above.
Have you thought about having a linux daemon/agent that runs in the background and keeps the ENV in sync?