The difference between get_cfg_var() and ini_get() is that the former returns whatever is in php.ini while the latter returns the runtime settings.
Configure the following parameter in php.ini.
[test_module] test_module.name = "module_name"
get_cfg_var() will happily return the text(module_name) while ini_get() would not, as it‘s not configurable option belonging to any extension. Or, in another word, ini_get() will only return items that are defined in the source code.