php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77028 HRTime extension arginfo is wrong for several functions
Submitted: 2018-10-17 13:48 UTC Modified: 2021-08-25 15:38 UTC
From: dktapps at pmmp dot io Assigned:
Status: Verified Package: Unknown/Other Function
PHP Version: 7.2.11 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
40 - 38 = ?
Subscribe to this entry?

 
 [2018-10-17 13:48 UTC] dktapps at pmmp dot io
Description:
------------
I filled "Unknown" in package affected because HRTime extension is not shown in the PECL list.

The arginfo for several HRTime extension functions are missing. This issue was noted when generating extension stubs for IDE code completion. This can be seen by running `php --re hrtime` with the HRTime PECL extension loaded.

The following functions (according to http://php.net/manual/en/book.hrtime.php) have arguments, but their arginfo does not show it:

- HRTime\PerformanceCounter::getTicksSince() has a missing, required `int $since` parameter
- HRTime\StopWatch::getElapsedTime() has a missing, optional `int $unit` parameter
- HRTime\StopWatch::getLastElapsedTime() has a missing, optional `int $unit` parameter



Expected result:
----------------
Arginfo in `php --re hrtime` would include the arguments required by these functions.

Actual result:
--------------
Arginfo omits the arguments which are documented in the manual.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-17 13:49 UTC] dktapps at pmmp dot io
-Summary: HRTime extension arginfo is wrong in for several functions +Summary: HRTime extension arginfo is wrong for several functions
 [2018-10-17 13:49 UTC] dktapps at pmmp dot io
fixed a typo in issue title
 [2021-08-25 15:38 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2021-08-25 15:38 UTC] cmb@php.net
Oh, indeed, the arginfo is generally lacking in HRTime, what is
even more of an issue wrt. PHP 8.  Maybe you want to provide a
PR[1] that introduces stubs?

[1] <https://github.com/php/pecl-datetime-hrtime/pulls>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 07:01:29 2024 UTC