petewarden / ParallelCurl

A PHP class providing an easy interface for running multiple concurrent CURL requests
http://petewarden.typepad.com/
379 stars 101 forks source link

Does this support anonymous functions? #14

Open codecowboy opened 10 years ago

codecowboy commented 10 years ago
$parallelcurl->startRequest('http://example.com', function(){
//function content
}, array('something'));
petewarden commented 10 years ago

Unfortunately I haven't been working with PHP for a while now, so I haven't added any support for anonymous functions. I'd be happy to roll in a patch if you are able to figure out what's needed!

exussum12 commented 9 years ago

@codecowboy ParallelCurl uses call_user_func which accepts a callable. You can use array($this, "methodName")

http://php.net/manual/en/language.types.callable.php