|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66343 DateTime static aliases don't have proper signatures on pages.
Submitted: 2013-12-23 20:46 UTC Modified: 2013-12-31 20:11 UTC
From: donatj at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: Irrelevant 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:
Solve the problem:
31 + 33 = ?
Subscribe to this entry?

 [2013-12-23 20:46 UTC] donatj at gmail dot com
From manual page:

DateTime static aliases don't have proper signatures on pages.

For example, date_offset_get, an alias of DateTime::getOffset should be noted as:

	int date_offset_get ( DateTimeInterface $object )

It **is** noted as such here:  

but is not on its own page here:

A non-exhaustive list of affected methods follow.

date_add, date_create_from_format, date_create_immutable_from_format, date_create_immutable, date_create, date_date_set, date_diff, date_format, date_get_last_errors, date_interval_create_from_date_string ... and many more from the section

Expected result:
int date_offset_get ( DateTimeInterface $object )

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-31 17:34 UTC]
-Status: Open +Status: Wont fix
 [2013-12-31 17:34 UTC]
In the structure of the PHP manual, alias pages do not have their own signature documentation (see for an example). I can understand why it might be a valuable addition for the DateTime procedural invocations, however it would tend to add a bit of a maintenance issue, and would unnecessarily complicate the alias page structure.

The function signatures for all of these aliases are present alongside their OOP method signatures, on the respective method pages. This is the natural place for them.

I'll think about whether we can create a simple pointer structure for the manual to import the function signature from the method page, but for now, I'll mark this bug as wont-fix.
 [2013-12-31 20:11 UTC] donatj at gmail dot com
My only comment is that the date time methods in particular this would be useful as they're not direct references but instead have their own signature entirely different from the object which while documented on the resolved alias page, would be much more useful on the aliases page it self.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 12:01:30 2024 UTC