Sebastian Del Valle
Sebastian Del Valle

Reputation: 41

cURL in PHP: curl_exec() or exec('curl')?

I've been wondering whether, despite of the obvious fact of granting access to the system shell, are there any performance flaws in using exec('curl') instead of curl_exec(), which demands a lot of pre-configuration and, thus, developing time, but is integrated with PHP, and what about threading and system resources?

Greetings :)

Upvotes: 4

Views: 2211

Answers (1)

Michael Krelin - hacker
Michael Krelin - hacker

Reputation: 143109

It's totally different, curl_exec() is a function call, whereas exec() spawns another process.

Upvotes: 3

Related Questions