Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php print version number of curl

Tags:

php

curl

I need to print curl version using this documnts :

<?PHP echo curl_version('version');?>

but my output is empty! how do can i print version number of curl?

like image 393
Pink Code Avatar asked Sep 02 '25 13:09

Pink Code


2 Answers

print_r(curl_version());    // remove your unexpected parameter
                            // also it returns an array , don't use echo. 

Fiddle

Edit after the comment

$values=curl_version();
echo $values["version"];

P.S: Of course you need to have cURL installed and enabled first.

like image 131
Hanky Panky Avatar answered Sep 05 '25 14:09

Hanky Panky


<?php

$info = curl_version();
echo $info["version"];

?>
like image 39
CS GO Avatar answered Sep 05 '25 14:09

CS GO