ParallelCurl icon indicating copy to clipboard operation
ParallelCurl copied to clipboard

Does this support anonymous functions?

Open codecowboy opened this issue 11 years ago • 2 comments

$parallelcurl->startRequest('http://example.com', function(){
//function content
}, array('something'));

codecowboy avatar Jan 27 '14 15:01 codecowboy

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!

petewarden avatar Jan 27 '14 20:01 petewarden

@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

exussum12 avatar Sep 23 '14 09:09 exussum12