|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-05 11:29 UTC] mccarthy36 at earthlink dot net
I'd like to see an optional boolean second argument to urlencode() and rawurlencode() to cause encoding of all characters in the argument string, even alphanumerics. Like this: string urlencode ( string str [, bool encode_all]) string rawurlencode ( string str [, bool encode_all]) Naturally the optional argument would default to false to preserve the current behavior. Thanks PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Feb 12 04:00:01 2026 UTC |
You can achieve the same results using preg_replace: preg_replace('/./e',"sprintf('%%%02X',ord('\\0'))",$foo); The resulting string can be parsed by any RFC compliant query string decoder.