chuyskywalker/rolling-curl — pull request #8 by xiankai (2014-04-26 16:40:31+00:00)
Title: Change setCallback to accept named functions as well

I am using named functions as it makes my code less messy, since my callback functions do some heavy-lifting and putting them in the same scope as `setCallback` makes it crowded.

However, relying on the type typehint `\Closure` when trying to pass in a named function results in

>PHP Catchable fatal error: Argument 1 passed to RollingCurl\RollingCurl::setCallback() must be an instance of Closure, array given, called in /index.php on line 23 and defined in /vendor/chuyskywalker/rolling-curl/src/RollingCurl/RollingCurl.php on line 292

My first solution was to change the type-hint to `callable` - it works for both named and anonymous functions but that would make it work only for PHP 5.4.

Alternatively, checking with `is_callable` seems best as the same check is used when attempting to call it in 264.