$value) { ${$var} = $value; } } // load config file (this is only done once per application lifecycle) if (!self::$texts) { self::$texts = require(__DIR__ . '/../config/texts.php'); } // check if array key exists if (!array_key_exists($key, self::$texts)) { return null; } return self::$texts[$key]; } }