Bug #77264 [NEW]: curl_getinfo returning microseconds, not seconds

From: Date: Fri, 07 Dec 2018 18:56:21 +0000
Subject: Bug #77264 [NEW]: curl_getinfo returning microseconds, not seconds
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218322@lists.php.net to get a copy of this message
From: chris at lodesys dot com Operating system: Windows PHP version: 7.3.0 Package: HTTP related Bug Type: Bug Bug description:curl_getinfo returning microseconds, not seconds Description: ------------ Under PHP 7.3.0, cURL appears to be returning times in microseconds instead of seconds. Running PHP executables downloaded from from http://windows.php.net The following example is from the curl_getinfo documentation page -- https://secure.php.net/manual/en/function.curl-getinfo.php Test script: --------------- <?php // Create a cURL handle $ch = curl_init('http://www.example.com/'); // Execute curl_exec($ch); // Check if any error occurred if (!curl_errno($ch)) { $info = curl_getinfo($ch); echo 'Took ', $info['total_time'], ' seconds to send a request to ', $info['url'], "\n"; } // Close handle curl_close($ch); ?> Expected result: ---------------- The expected result is less than 0.5 seconds "to send a request". This is what I'm seeing when running this script with PHP 7.2.12 Actual result: -------------- I'm getting values like 110000 seconds "to send a request" (30.5 hours). Same script run with PHP 7.3.0 Have the same microseconds-not-seconds problem with all the time values Total_Time Namelookup_Time Connect_Time Pretransfer_Time Starttransfer_Time -- Edit bug report at https://bugs.php.net/bug.php?id=77264&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77264&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77264&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77264&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77264&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77264&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77264&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77264&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77264&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77264&r=support Expected behavior: https://bugs.php.net/fix.php?id=77264&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77264&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77264&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77264&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77264&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77264&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77264&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77264&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77264&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77264&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77264&r=mysqlcfg

« previous php.bugs (#218322) next »