Skip to content

Conversation

@sy-records
Copy link
Member

Fix #7535

@henderkes
Copy link

henderkes commented Sep 17, 2025

The default escape character was "\\", not '\\'. I believe '\\' is two backslashes, rather than one.

@sy-records
Copy link
Member Author

sy-records commented Sep 17, 2025

@henderkes
Copy link

I use the same escape character as well, I just wanted to make you aware that this changes functionality.

@henderkes
Copy link

henderkes commented Sep 17, 2025

Edit: TIL, '-strings do some escaping too.

'\n' => \n
"\n" => line break
but
'\\' => \
"\\" => \

So it doesn't actually change functionality because php has a weird, inconsistent escaping mechanism with single quote strings, where backslashes escape only ' and \ characters, but are otherwise interpreted as literal characters.

@limingxinleo limingxinleo changed the title Update str_getcsv to handle escape characters Fixed bug that Hyperf\Validation\ValidationRuleParser::parseParameters() cannot support PHP 8.4. Oct 28, 2025
@limingxinleo limingxinleo merged commit 29bd355 into master Oct 28, 2025
61 of 62 checks passed
@limingxinleo limingxinleo deleted the fix/str_getcsv branch October 28, 2025 13:14
@limingxinleo limingxinleo mentioned this pull request Oct 30, 2025
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.

[FEATURE] PHP8.4str_getcsv语法兼容

4 participants