php / php/doc-en

Additional Information for References in Arrays

Open Beginner friendly
#2,762 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

From manual page: https://php.net/language.references.whatdo


I think it would make a lot of sense to add the piece of information that references inside arrays are highlighted as such when using var_dump() with the array. I am talking about something like this:

array(4) {
  [0]=>
  int(0)
  [1]=>
  &int(1)
  [2]=>
  int(2)
  [3]=>
  int(3)
}

It seems that this piece of information is neither available in the chapter on references nor in the definition of var_dump():
https://www.php.net/manual/en/language.references.whatdo.php and https://www.php.net/manual/en/function.var-dump. I think it should be.

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

Start by reading the references and var_dump() manual pages linked in the issue, then compare their current explanations with the supplied output. Update the relevant PHP documentation to explain that references in arrays are highlighted by var_dump(), including a suitable example, and verify that both topics describe the behavior consistently.

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
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.