Warning: Division by zero in /var/customers/webs/stc/benchmark/index.php on line 256 Test: urlencode vs. rawurlencode

PHP Benchmarks

Performance comparison of PHP code alternatives.

Test: urlencode() vs. rawurlencode()

urlencode differs from RFC 1738 by encoding spaces as + instead of %20 as rawurlencode does

Run Again Test Menu

Result

Unfortunately, no history for this test is available.

Code

The first test, "urlencode()", was:

$GLOBALS['dummy2'] = urlencode($GLOBALS['dummy']);

The second test, "rawurlencode()", was:

$GLOBALS['dummy2'] = rawurlencode($GLOBALS['dummy']);

Running: Linux (x86_64:1 GB) PHP (7.2.22-1+ubuntu16.04.1+deb.sury.org+1)