Programmatically disable specific PHP functions for testing
<p>I have a function that makes HTTP requests with cURL that falls back to <code>file_get_contents()</code> if cURL is not available on the system.</p>

<p>I would like to write unit tests for this function (utilizing PHPUnit) where cURL is available for some tests, and not available for others.</p>

<p><strong>Is it possible to programmatically disable PHP functions, such as <code>curl_init()</code>?</strong></p>

<p>I know I can use the <code>disable_functions</code> setting in php.ini, but I was hoping to find a way to do unit tests without reconfiguring PHP in between runs.</p>
