php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #41572 Example 19.40: My_Reflection_Method::$visibility is string or array?
Submitted: 2007-06-02 21:17 UTC Modified: 2007-08-17 04:42 UTC
From: salsi at icosaedro dot it Assigned:
Status: Closed 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 !
Your email address:
MUST BE VALID
Solve the problem:
19 - 11 = ?
Subscribe to this entry?

 
 [2007-06-02 21:17 UTC] salsi at icosaedro dot it
Description:
------------
Manual page about the Reflection* classes, example 10.40 "Extending the built-in classes". The property My_Reflection_Method::$visibility gets initialized with an empty string, then an array generated by Reflection::getModifierNames() is assigned. This confused me a bit before I realized the returned value is, indeed, an array.

I suggest to modify this example so to save time to the future readers either changing the initial value of the property to "array()" or adding a join() to the value returned by getModifierNames().



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-17 04:42 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Initialized to array().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 08:01:29 2024 UTC