-
Notifications
You must be signed in to change notification settings - Fork 740
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
str_getcsv() and friends should not explicitly tell about "optional" parameters #4175
Comments
If the CSV is not enclosed because it doesn't have any $columns = str_getcsv($csv, ',', '"', '\\'); Will give you the same output as with an empty string. |
@Girgias Thank you for the quickly reply. I confirm that it works not only with the default enclosure character, but with any enclosure character. Should the documentation be updated to say that if the CSV does not use enclosure characters leaving the default character works? I feel the way it's currently explained is confusing. |
In my opinion, the documentation is okay. After all, generally there needs to be an enclosure character, and in those cases where the CSV can do without, using the default is fine. (I find https://3v4l.org/Lf0SD a bit fishy, though.) And frankly, I don't think |
I suppose we could remove the word "optional" from the descriptions? |
Oh, right; users can figure that from the signature. |
Okay, transferring to doc-en then. |
Description
The following code:
Resulted in this output in php 8.3.10:
Now in php 8.4.1, I get this:
I saw that the behavior of the function was changed, not to permit an empty enclosure, however who are we meant to deal with unenclosed csv?
PHP Version
PHP 8.4.1
Operating System
Windows 10
The text was updated successfully, but these errors were encountered: