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
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: dktapps at pmmp dot io
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Mon Nov 25 12:01:31 2024 UTC