Or are you talking about exploring the OS primitives to share data between instances of your code? Because avoiding that shouldn't require a lot of care, and PHP has basically the same capacity.
You can't do that in PHP, you need to explicitly write to redis/memcached/file/database to be able to read values from another request.
However, this is not a problem at all. In Go you would have to get out of your way to share information between user agents just like you would have to do in PHP.
Intentionally writing to and reading from a global variable is the exact same as intentionally writing to and reading from your MariaDB instance.
I have no clue why you would render this process problematic. Maybe in Python everything is a global?!