Hacker News new | ask | show | jobs
by jordanlev 3181 days ago
> If you're a PHP user, don't use this function unless you know you need to. There are better functions now.

Don't leave me hanging! What are the better functions now?

2 comments

`rawurlencode()` is what you're after.

And here is where you'd ask that question, a coding forum https://stackoverflow.com/questions/996139/urlencode-vs-rawu...

Thanks!

And here is where you'd answer that question, a coding forum https://stackoverflow.com/questions/996139/urlencode-vs-rawu...

;)

Knowing PHPs standard library, probably something like "urlencode_safe_for_real_this_time".

Kidding aside, IIRC "rawurlencode" is the RFC compliant one.