php / php/doc-en

Improve phrasing of the comments inside the code example #3.

Open
#2,932 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Status: Verified
Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

From manual page: https://php.net/language.oop5.late-static-bindings


Quoting the confusing comments inside the code example #3.:

/* foo() will be copied to B, hence its scope will still be A and
* the call be successful */

I understand the code's behavior fine, but the comments confused me a lot, I'm asking like:

  • Since foo() is a private method, why foo() will be copied to B?
  • If foo() indeed will be copied to B, why then the scope will be A ?

It conflict with our understanding of how "inheritance" works, also the whole sentence conflict itself. The word "copied" or the whole statement need to be fixed or improved.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the PHP late static bindings manual page and locate code example #3 and the quoted comments. Review the surrounding example, then revise the comments so they accurately explain the private method's scope and why the call succeeds without contradictory wording; the updated comments should resolve the questions raised in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.