Safety of globalizing config data
Yes, it is safe. No, it is not a good idea.

Don't mix application logic and configuration with the database, the database is used for permanent storage of data.

Use a file (json, ini, xml, whatever) which is named the same but has different contents in production/dev environments. Then, it's as simple as:

$config = json_decode(file_get_contents('config.json')); //I'm assuming JSON here


Also, please don't globalize configuration. Pass whichever config option you need (just that config option, not the whole configuration array) into whatever function/object that needs it.