php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68042 series of missing/inadequate documentation
Submitted: 2014-09-18 11:26 UTC Modified: 2014-09-21 06:24 UTC
From: jmichae3 at yahoo dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.6.0 OS: win7ult64sp1retail
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jmichae3 at yahoo dot com
New email:
PHP Version: OS:

 

 [2014-09-18 11:26 UTC] jmichae3 at yahoo dot com
Description:
------------
This started with a documentation check for a reply I received:
"Your code to test function creation should be
  !is_callable(${'is'.$AcctTypes[$i].'file'})"

this does not match what is given in the example in the documentation (although it works somehow regardless of the example).

see Actual for the list of items that need attention.



Test script:
---------------
1. http://php.net/manual/en/function.is-callable.php
2. search for type hint in search box [no results]


Expected result:
----------------
- clarified documentation for "name" argument in http://php.net/manual/en/function.is-callable.php
- "type hint" definition in the documentation somewhere I can search for
- callable listed in right hand side navigatoin sidebar.

Actual result:
--------------
is_callable()'s "name" argument conflicts with its "callable" type in the documentation at http://php.net/manual/en/function.is-callable.php
does "the callback function to check" mean:
- the function body string
- the lambda function body (this seems more appropriate)
- the name string of the variable containing the function name
- the name of the function
replace name with functionBody? this way people know to expand the variable name, otherwise, it's confusing and they will put in a string rather than lambda function body.


this is exacerbated by another lack of definition or proper link for the linked type "callable" at http://php.net/manual/en/language.types.callable.php

this links to http://php.net/manual/en/language.types.callable.php
if you notice on the right hand side navigation where it lists types, "Callable" is not listed as a type.
none of the pages mentioned gives a definition for "type hint" (a new term for me). I know what a type is, but I don't know how "hint" (with regards to "type hint") applies to a type or changes it(?) or makes it different. I don't know what "type hint" means or does or why it's there.

so I put "type hint" in the search box, and I got "not found" for search results.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-21 06:24 UTC] krakjoe@php.net
-Status: Open +Status: Not a bug
 [2014-09-21 06:24 UTC] krakjoe@php.net
Your problem stems from misunderstanding, not a bug in the documentation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC