php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72650 [FR] Traduction problem for visibility
Submitted: 2016-07-22 15:35 UTC Modified: 2017-07-02 10:25 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: marsella dot lorenzo at gmail dot com Assigned: yannick (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS:
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: marsella dot lorenzo at gmail dot com
New email:
PHP Version: OS:

 

 [2016-07-22 15:35 UTC] marsella dot lorenzo at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.oop5.visibility
---
Traduction problem between :

Members declared protected can be accessed only within the class itself and by inherited classes.

L'accès aux éléments protégés est limité à la classe elle-même, ainsi qu'aux classes qui en héritent,--> et à ses classes parentes. <--

Protected members can't be accessed by parent class.

Expected result:
----------------
L'accès aux éléments protégés est limité à la classe elle-même, ainsi qu'aux classes qui en héritent.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-22 16:34 UTC] cmb@php.net
-Summary: Traduction problem in French for visibility +Summary: [FR] Traduction problem for visibility
 [2016-07-23 16:35 UTC] pierrick@php.net
-Package: Translation problem +Package: Documentation problem
 [2016-07-23 16:35 UTC] pierrick@php.net
Also it's really bad practice because a parent class should not know about its child, the parent class do in fact have access to protected properties.

<?php

class A { public function test() { echo self::class . ':' . $this->foo; } }
class B extends A { protected $foo = 'bar'; }
(new B())->test(); // A:bar

?>

Do we want to fix the english version to reflect the reality ? or should we fix the french one not to advocate bad practices ?
 [2017-01-28 14:02 UTC] cmb@php.net
-Package: Documentation problem +Package: Translation problem
 [2017-07-02 10:24 UTC] yannick@php.net
Automatic comment from SVN on behalf of yannick
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=342639
Log: Fix bug #72650
 [2017-07-02 10:25 UTC] yannick@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: yannick
 [2017-07-02 10:25 UTC] yannick@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.


 [2020-12-30 12:48 UTC] nikic@php.net
Automatic comment on behalf of yannick
Revision: http://git.php.net/?p=doc/fr.git;a=commit;h=61f68a4b04d01c64ac38a5fa5a946886b43c2ce8
Log: Fix bug #72650
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC