Usage of `strstr` for character replacement
Closed this issue · 2 comments
tstrijdhorst commented
I was looking through the source and I saw this:
https://github.com/Spomky-Labs/base64url/blob/master/src/Base64Url.php#L27
It seems like you are using strstr
to replace the characters but AFAIK you can't do that with strstr
as it is meant to find occurances of substrings. Could you please care to elaborate? I am really interested in what is going on here.
tstrijdhorst commented
Ahhhhh I see, I'm so used to reading strstr that I didn't actually read it but just filled in the blanks. Amazing that after 10 years of PHP i've never seem to have used that function, always go for the pregex.
Thanks a lot :)