Improve documentation by renaming needle and haystack arguments
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Affected page
https://www.php.net/manual/en/function.str-contains.php
https://www.php.net/manual/en/function.strpos.php
https://www.php.net/manual/en/function.in-array.php
...
Current issue
In the PHP documentation, many string and array-related functions use the argument names needle and haystack. While this metaphor may be familiar to native English speakers, it can be confusing for non-native speakers or beginners.
Suggested improvement
Renaming these arguments to something more descriptive — such as searchString and targetText, or substring and fullString — would make the documentation clearer and more accessible. Improving clarity in naming could greatly help learners understand function behavior without having to interpret idiomatic expressions.
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
Review the affected PHP manual pages, starting with function.str-contains.php, function.strpos.php, and function.in-array.php, and identify the documentation source files for their parameter names. Determine a consistent replacement for “needle” and “haystack” before editing the related pages. Done means the affected references use clear, consistent argument names and the documentation remains accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100