php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81547 print documentation section Documentation is contradictory
Submitted: 2021-10-20 19:03 UTC Modified: 2021-11-03 13:08 UTC
From: ddpm at liscovius dot de Assigned:
Status: Open Package: Documentation problem
PHP Version: Irrelevant 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: ddpm at liscovius dot de
New email:
PHP Version: OS:

 

 [2021-10-20 19:03 UTC] ddpm at liscovius dot de
Description:
------------
Synopsis on https://www.php.net/manual/en/function.print.php shows:

print(string $expression): int

But the description text says: 

"print is not a function but a language construct. Its argument is the expression following the print keyword, and is not delimited by parentheses."

I see that the problem lies in the way the documentation is built. How should the synopsis be for such **language construct**?

Expected result:
----------------
I do not know (yet).

Actual result:
--------------
print(string $expression): int

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-03 13:08 UTC] cmb@php.net
To my knowledge, DocBook has no special support for language
constructs (except maybe for EBNF, but that's a different story);
this is why our existing documentation for language constructs[1]
is suboptimal.  For print, and other language constructs which are
somewhat function-like, it makes probably still sense to document
these as functions.  If we want to get rid of the parentheses in
the synopses, this could be accomplished by adding some attribute
and to adapt PhD[2] accordingly.  However, it is not clear what to
do with the return values, and whether it's worth working on this
at all.

[1] <https://www.php.net/manual/en/language.control-structures.php>
[2] <https://github.com/php/phd>
 [2022-12-09 06:28 UTC] amin dot jadabari242 at gmail dot com
Thanks for that. (https://www.myaccountaccess.one/)github.com
 [2023-04-20 08:56 UTC] simona at myaccountaccess dot onl
Thanks for that. (https://www.myaccountaccess.onl/)github.com
 [2024-04-23 12:45 UTC] dgme dot life at gmail dot com
The blog was absolutely fantastic! Thank you for sharing this.It is worth reading for everyone. Very informative article. Keep it up.


(https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://www.dgme.run/)
 [2024-04-24 09:15 UTC] dgme dot life at gmail dot com
thanks


(https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://www.dgme.run/)
 [2024-05-06 11:54 UTC] blogaccess07 at gmail dot com
Nice post! We do our best to stay compliant. We don't need issues.


(https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://www.myaccountaccess.run/)
 [2024-05-18 12:43 UTC] jeonlae10 at gmail dot com
Thanks for sharing this helpful website.
https://gist.github.com/jeonlae/5cf8601ca0a0586417df8d1340c6864a
 [2024-05-24 12:33 UTC] njmcdirecttonline at gmail dot com
I am thankful for the specifics, and I will do all in my power to learn more. (https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://njmcdirectt.online/)
 [2024-06-12 14:41 UTC] benefitscal7 at gmail dot com
I am thankful for the specifics.(https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://benefitcal.online/)
 [2024-06-13 13:08 UTC] njmcdirectuss at gmail dot com
Many thanks for all of the effort that you have put in.(https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://njmcdirect.us/)
 [2024-07-24 14:22 UTC] njmcdiirectonline at gmail dot com
I really appreciate your wonderful blog post. (https://github.com/php/php-src/blob/php-8.1.0/NEWS)(https://njmcdiirect.online/)
 [2024-08-01 16:35 UTC] comics710 at hotmail dot com
The following pull request has been associated:

Patch Name: Update README
On GitHub:  https://github.com/php/phd/pull/141
Patch:      https://github.com/php/phd/pull/141.patch
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 08:01:27 2024 UTC