I really don't like defining functions inside other functions or methods.

The WP apache_mod_loaded() function also checks `phpinfo()`. Would it be possible to use `init_set()` to achieve the desired effect?