On 23.03.2021 at 06:04, Stanislav Malyshev wrote:

>> t fopen mode
>
> I'm afraid there's - despite the warning - a bunch of code for Windows
> that relies on "t" and I don't think we should be breaking it. Is there
> a good reason to drop this mode?

I don't see much need for 't' mode nowadays.  Even Notepad properly
handles LF fine for some years now.  It's not really bad, if it can be
explicitely specified.  However, deprecating 't' mode would pave the way
to sometime change shell_exec() to no longer use 't' mode, what is a
footgun when dealing with binary data.  So when using the backtick
operator on Windows, you always need to keep that in mind.  From my
experience, 't' mode causes more harm than good.

And if there is really the need for LF conversion, that still can be
done with an explicit filter.

--
Christoph M. Becker

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to