Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed $before_needle argument of strrchr() description #2723

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

mumumu
Copy link
Member

@mumumu mumumu commented Aug 30, 2023

New parameter $before_needle outputs result based on the last occurances of needle.

$ sapi/cli/php --version | head -n 1
PHP 8.4.0-dev (cli) (built: Aug 30 2023 22:08:33) (NTS)

$ sapi/cli/php -r '$text = "Line 1:Line 2:Line 3"; var_dump(strrchr($text, ":", false));'
string(7) ":Line 3"

$ sapi/cli/php -r '$text = "Line 1:Line 2:Line 3"; var_dump(strrchr($text, ":", true));'
string(13) "Line 1:Line 2"

@mumumu mumumu requested a review from Girgias August 30, 2023 13:23
Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for that remark.

reference/strings/functions/strrchr.xml Outdated Show resolved Hide resolved
@TimWolla TimWolla merged commit 31d54a1 into php:master Aug 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants