php / php/doc-en

Improve example about static variables in functions

Open
#2,671 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue QA
Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

          This statement _is_ needed to reset the value when doing a follow-up call to ``test()``, it would be better to add a coment, or create another without the statement and have it call ``test()`` twice. In any case showing the output of this code would be a good enhancement

Originally posted by @Girgias in https://github.com/php/doc-en/issues/2667#issuecomment-1671328176

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

Locate the PHP documentation example about static variables in functions and inspect how test() is called across follow-up calls. Clarify why the reset statement is needed, add the requested explanation or separate example, and show the resulting output; verify the rendered documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.