No description provided.
Support 's' and '\' in date()
@jacobembree This looks great, thanks.
Splendid. Since I'm a new user of pull requests on Github, I don't know if your positive review is meant to apply only to the lines I see, 264-267, or to the whole patch. Is there anything I need to do? Do you want me to submit another patch without the backslash support?
@jacobembree I'm confused by what grab_next and the \\ are used for. Would you please provide an example input/output of what this produces? Thanks.
@jacobembree This is the only snippet I am concerned/confused about. Please let me know when you have a chance, thanks.
Well, console.log(grab_next) isn't supposed to be there actually.
When someone calls something like date('Day: d') the "D" and "a" are interpreted as tokens. The backslash is supported in PHP as an escape token so that you can call date('\D\ay: d). The backslashes themselves need to be escaped though to work, so the call becomes date('\\D\\ay: d).
The way this patch works is when it detects a backslash it grabs the next character literally rather than checking it for a token.