3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = "aHR0cHM6Ly93d3cucGhwLm5ldC9tYW51YWwvZW4vZnVuY3Rpb24uc3RyLXNwbGl0LnBocA=="; $len = strlen($mystring); $end_of_first = rand(1, $len - 2); $end_of_middle = rand(1, $len - $end_of_first - 1); $result = sscanf($mystring, "%{$end_of_first}s%{$end_of_middle}s%s"); var_export($result); echo "\n---\n"; var_export(compact(['len', 'end_of_first', 'end_of_middle']) + ['implodedCount' => strlen(implode($result))]);

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.100.0070.00016.90
8.0.90.0080.00016.90
8.0.80.0040.00416.93
8.0.70.0000.00716.80
8.0.60.0080.00016.79
8.0.50.0030.00517.00
8.0.30.0020.00516.86
8.0.20.0040.00417.05
8.0.10.0000.00817.02
8.0.00.0020.00517.08
7.4.230.0040.00416.64
7.4.220.0090.00016.49
7.4.210.0000.00816.45
7.4.200.0050.00216.59
7.4.190.0040.00416.73
7.4.180.0050.00316.73
7.4.160.0030.00616.56
7.4.150.0050.00216.63
7.4.140.0040.00416.23
7.4.130.0000.00716.30
7.4.120.0030.00316.54
7.4.110.0000.00716.46
7.4.100.0070.00016.32
7.4.90.0030.00316.21
7.4.80.0050.00216.40
7.4.70.0040.00416.51
7.4.60.0060.00316.53
7.4.50.0080.00016.46
7.4.40.0040.00416.37
7.4.30.0030.00516.47
7.4.20.0070.00016.22
7.4.10.0050.00216.28
7.4.00.0000.00816.34
7.3.300.0030.00316.24
7.3.290.0000.00716.29
7.3.280.0000.00716.30
7.3.270.0040.00216.28
7.3.260.0070.00016.33
7.3.250.0040.00416.29
7.3.240.0000.00716.17
7.3.230.0000.00716.36
7.3.220.0090.00016.29
7.3.210.0040.00416.15
7.3.200.0030.00616.27
7.3.190.0000.00816.20
7.3.180.0070.00016.19
7.3.170.0070.00016.32
7.3.160.0070.00016.17
7.3.150.0000.00716.28
7.3.140.0040.00416.28
7.3.130.0070.00016.29
7.3.120.0000.00716.19
7.3.110.0070.00016.17
7.3.100.0000.00716.21
7.3.90.0040.00416.52
7.3.80.0040.00416.29
7.3.70.0080.00016.38
7.3.60.0040.00416.28
7.3.50.0090.00016.43
7.3.40.0000.00716.39
7.3.30.0000.00716.38
7.3.20.0040.00416.35
7.3.10.0060.00316.33
7.3.00.0080.00016.38

preferences:
37.39 ms | 403 KiB | 5 Q