I need to require/ include a file to fetch configuration values from a foreign software into the one I am just developing.
Is it possible to somehow process the external php file via include/ require and either load all variables from it into an array or at least set it into kind of a custom namespace to prevent it from resetting existent variables?
The external application is pretty old and uses plain PHP and variable assignments to prepare it for the run.
Example:
$db_type = 'mysql';
$db_user = 'hello';
$db_pass = 'world';
$charset = 'UTF-8';