FILTER_VALIDATE_INT should support FILTER_FLAG_ALLOW_THOUSAND
Open
Nobody has claimed this yet.
Extension: filter
Feature
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
just like
filter_var("231,402,800",FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND)
returns
float(231402800)
doing
filter_var("231,402,800",FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_THOUSAND)
should return
int(231402800)
rather than the current
bool(false)
Contributor guide
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 by locating the implementation of filter_var() for FILTER_VALIDATE_INT and compare its behavior with FILTER_VALIDATE_FLOAT when FILTER_FLAG_ALLOW_THOUSAND is used. Confirm the change with a case equivalent to filter_var("231,402,800", FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_THOUSAND), which should return int(231402800) instead of false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100