php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65415 curl_getinfo() with set opt doesn't return a string but a float
Submitted: 2013-08-07 14:49 UTC Modified: 2013-10-04 17:16 UTC
From: fausten at pw-internet dot de Assigned: krakjoe (profile)
Status: Closed Package: cURL related
PHP Version: 5.4.17 OS: FreeBSD 9.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fausten at pw-internet dot de
New email:
PHP Version: OS:

 

 [2013-08-07 14:49 UTC] fausten at pw-internet dot de
Description:
------------
The doc says:

http://php.net/manual/en/function.curl-getinfo.php

"If opt is given, returns its value as a string. Otherwise, returns an associative array with the following elements (which correspond to opt), or FALSE on failure"

Test script:
---------------
<?php

$resCurl = curl_init('http://www.dddbl.de');
curl_exec($resCurl);
var_dump(curl_getinfo($resCurl, CURLINFO_CONTENT_LENGTH_DOWNLOAD));


Expected result:
----------------
string(4) "4531"

Actual result:
--------------
float(4531)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-04 17:16 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=331667
Log: #65415 clarity in description
 [2013-10-04 17:16 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2013-10-04 17:16 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jun 03 04:01:26 2025 UTC