3v4l.org

run code in 300+ PHP versions simultaneously
<?php function base64_encode_url($string) { return str_replace(['+','/','='], ['-','_',''], base64_encode($string)); } function base64_decode_url($string) { return base64_decode(str_replace(['-','_'], ['+','/'], $string)); } for ($i=0; $i<20000; $i++) { $data = random_bytes(rand(12,20)); if (base64_decode_url(base64_encode($data)) !== $data) { echo "FAIL"; } } echo "OK" . base64_encode_url();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.0.80.0520.04016.90
8.0.70.0650.05916.84
8.0.60.0370.04816.69
8.0.50.0390.04916.83
8.0.30.0410.06016.73
8.0.20.0370.05016.91
8.0.10.0450.03916.82
8.0.00.0430.04316.95
7.4.210.0440.06116.47
7.4.200.0510.03516.41
7.4.190.0420.06216.59
7.4.180.0250.05716.55
7.4.160.0390.06616.48
7.4.150.0940.06516.25
7.4.140.0340.05316.36
7.4.130.0350.06616.43
7.4.120.0380.04116.33
7.4.110.0520.04416.52
7.4.100.0390.03916.26
7.4.90.0490.05216.39
7.4.80.0410.04116.32
7.4.70.0310.04916.34
7.4.60.0360.05416.43
7.4.50.0320.04416.23
7.4.40.0530.05016.27
7.4.30.0440.05416.28
7.4.20.0320.04916.35
7.4.10.0160.05916.36
7.4.00.0310.04816.43
7.3.290.0300.05216.40
7.3.280.0430.05316.38
7.3.270.0440.04816.23
7.3.260.0250.05416.32
7.3.250.0260.04816.21
7.3.240.0240.05116.33
7.3.230.0860.06316.31
7.3.220.0390.04616.33
7.3.210.0390.03916.24
7.3.200.0380.04216.26
7.3.190.0310.04516.28
7.3.180.0490.03316.23
7.3.170.0430.04616.33
7.3.160.0430.05416.33
7.3.150.0610.03916.26
7.3.140.0520.05916.36
7.3.130.0270.04716.29
7.3.120.0160.04816.35
7.3.110.0200.04416.19
7.3.100.0200.04816.29
7.3.90.0240.04916.50
7.3.80.0260.04216.24
7.3.70.0270.05716.38
7.3.60.0270.03816.56
7.3.50.0300.03716.42
7.3.40.0300.04116.43
7.3.30.0290.04516.46
7.3.20.0190.04816.41
7.3.10.0290.03916.29
7.3.00.0420.02616.34

preferences:
40.02 ms | 400 KiB | 5 Q