`array_column()` should handle not-set column name
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Description
repro: https://3v4l.org/o3IRK
man: https://www.php.net/manual/en/function.array-column.php
It seems almost like a bug, but I would expect at least warning when $column_key param is not found in every row.
Currently any row without the $column_key present are skipped without any warning.
Alternatively I null can be assumed instead.
If the original behaviour is preferred, I would like to have $strict param added which will require $column_key present in every row and $index_key too if set.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the array_column() manual page and compare its documented behavior with the provided 3v4l.org reproduction. Determine whether missing column keys need a documented warning, null result, or an explicitly specified strict option, then update the manual once the expected behavior is settled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100