You can do this programmatically:
ini_set('disable_functions', 'fopen,shell_exec');
or in .htaccess :
php_value disable_functions fopen,shell_exec
There should be no performance degradation. I doubt that you will change the settings repeatedly inside the for() , while() or foreach() .
stillstanding
source share