Nico O Nico O - 3 years ago 271
PHP Question

PHP urlencode differences between versions

When I use

urlencode()
on the same string containing special characters in PHP7 and PHP 5.3.10, the results are different.

What I tried:



urlencode('Testör')


Output in PHP7:
Test%C3%B6r


Output in PHP 5.3:
Test%25C3%25B6r


Could someone explain what the %25 leading in the older PHP version is?

Answer Source

It looks to me that you've URL encoded it twice in the 5.3 output. %25 stands for %. Which is missing around the C3.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download