php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42984 typo in Members Visibility
Submitted: 2007-10-16 03:09 UTC Modified: 2007-10-16 10:00 UTC
From: phpdan at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpdan at gmail dot com
New email:
PHP Version: OS:

 

 [2007-10-16 03:09 UTC] phpdan at gmail dot com
Description:
------------
http://www.php.net/manual/en/language.oop5.visibility.php

Line 2 below should be echo $obj2->public; // Works
You could consider changing line 5 to $obj2->printHello(); // Shows Public, Protected2, undefined


$obj2 = new MyClass2();
echo $obj->public; // Works
echo $obj2->private; // Undefined
echo $obj2->protected; // Fatal Error
$obj2->printHello(); // Shows Public, Protected2, not Private


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-16 10:00 UTC] rquadling@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.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC