On Thu, Mar 30, 2017 at 8:05 AM, Rowan Collins <rowan.coll...@gmail.com>
wrote:

> On 30 March 2017 14:25:02 BST, Rasmus Schultz <ras...@mindplay.dk> wrote:
>
> >Returning backslashes on Windows seems rather unnecessary in the first
> >place, since forward slashes work just fine?
>
> This may be true when using the paths within PHP, but is it true outside
> of it? If your JSON file had been read in by a .net application, or used to
> generate a DOS/NT batch file, wouldn't forward slashes there have been just
> as broken as backslashes on a Linux box?
>
>
In my experience, forward slashes work just fine in .NET 4.0+ (haven't ever
used less than 4.0, so I won't claim to know), PowerShell and batch files.
Command prompt deals with it just fine.


> Sadly, I fear this is like trying to automate line ending conversion - the
> more you try to avoid being platform-specific, the more awkward cases you
> introduce.
>

I tend to agree. It's really not that hard to handle in the application
itself, instead of relying on the language to perform some magic. We
generally know that magic features aren't so great, so let's not go adding
more.


>
> Regards,
>
> --
> Rowan Collins
> [IMSoP]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to