3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urandom = sha1(file_get_contents('/dev/urandom', false, null, -1, 1024)); var_dump($urandom); echo "<hr />"; $base_convert = base_convert($urandom, 16, 11); var_dump($base_convert); echo "<hr />"; $base10 = base_convert($urandom, 16, 10); $converted = ''; //$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $chars = '0123456789a'; $base = strlen($chars); while ( $base10 != '0' ) { $converted = $chars{bcmod($base10, $base)} . $converted; $base10 = bcdiv($base10, $base); } var_dump($converted);

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.3.60.0090.00618.31
8.3.50.0130.00616.61
8.3.40.0110.00418.59
8.3.30.0070.00718.42
8.3.20.0000.00818.60
8.3.10.0030.00620.39
8.3.00.0070.01117.25
8.2.180.0070.00716.38
8.2.170.0140.00022.96
8.2.160.0070.00722.12
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0000.00819.70
8.2.110.0090.00021.06
8.2.100.0110.00017.78
8.2.90.0040.00419.16
8.2.80.0000.00717.80
8.2.70.0060.00317.25
8.2.60.0040.00417.91
8.2.50.0050.00318.07
8.2.40.0000.00819.82
8.2.30.0040.00417.83
8.2.20.0080.00017.45
8.2.10.0060.00317.55
8.2.00.0000.00817.45
8.1.280.0090.00625.92
8.1.270.0050.00324.66
8.1.260.0030.01026.35
8.1.250.0080.00028.09
8.1.240.0000.00920.56
8.1.230.0070.00721.03
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0070.00317.23
8.1.190.0060.00317.40
8.1.180.0040.00418.10
8.1.170.0060.00318.83
8.1.160.0070.00018.70
8.1.150.0070.00018.44
8.1.140.0050.00317.32
8.1.130.0030.00317.70
8.1.120.0070.00017.29
8.1.110.0040.00417.22
8.1.100.0000.00717.22
8.1.90.0070.00017.38
8.1.80.0000.00717.32
8.1.70.0030.00317.17
8.1.60.0040.00417.47
8.1.50.0040.00417.36
8.1.40.0080.00017.39
8.1.30.0030.00617.41
8.1.20.0050.00317.50
8.1.10.0000.00817.39
8.1.00.0050.00617.24
8.0.300.0040.00419.74
8.0.290.0040.00416.63
8.0.280.0030.00318.32
8.0.270.0000.00717.07
8.0.260.0000.00616.75
8.0.250.0000.00716.80
8.0.240.0100.00016.84
8.0.230.0000.00816.88
8.0.220.0040.00416.78
8.0.210.0030.00316.79
8.0.200.0000.00716.77
8.0.190.0030.00716.78
8.0.180.0000.00716.86
8.0.170.0030.00616.85
8.0.160.0070.00016.82
8.0.150.0040.00416.73
8.0.140.0000.00816.68
8.0.130.0060.00013.29
8.0.120.0000.00816.72
8.0.110.0050.00216.82
8.0.100.0040.00416.86
8.0.90.0000.00716.78
8.0.80.0110.00316.78
8.0.70.0060.00316.78
8.0.60.0040.00416.70
8.0.50.0000.00816.69
8.0.30.0130.00816.77
8.0.20.0090.00916.97
8.0.10.0050.00216.98
8.0.00.0140.00316.61
7.4.330.0050.00013.21
7.4.320.0030.00316.79
7.4.300.0030.00316.81
7.4.290.0040.00416.67
7.4.280.0030.00716.77
7.4.270.0000.00816.69
7.4.260.0050.00013.48
7.4.250.0070.00316.78
7.4.240.0000.00716.77
7.4.230.0000.00716.82
7.4.220.0110.00916.61
7.4.210.0070.01116.69
7.4.200.0040.00416.59
7.4.190.0080.00016.70
7.4.160.0130.00416.70
7.4.150.0060.01216.71
7.4.140.0110.00916.79
7.4.130.0110.00616.71
7.4.120.0120.00916.66
7.4.110.0100.01016.77
7.4.100.0030.01416.55
7.4.90.0100.01416.76
7.4.80.0100.00716.80
7.4.70.0170.00016.71
7.4.60.0060.01216.86
7.4.50.0030.00316.58
7.4.40.0100.00316.43
7.4.30.0070.01017.02
7.4.00.0100.00715.23
7.3.330.0050.00213.38
7.3.320.0030.00313.63
7.3.310.0050.00216.45
7.3.300.0070.00016.64
7.3.290.0080.00616.65
7.3.280.0080.01016.69
7.3.270.0100.00716.76
7.3.260.0180.00416.52
7.3.250.0140.00516.57
7.3.240.0100.00716.81
7.3.230.0110.00716.80
7.3.210.0090.00916.74
7.3.200.0160.00719.39
7.3.190.0070.01516.85
7.3.180.0060.00916.80
7.3.170.0090.01216.65
7.3.160.0000.01616.77
7.3.120.0080.00814.76
7.2.330.0050.01416.70
7.2.320.0140.00316.65
7.2.310.0090.00916.81
7.2.300.0090.00916.63
7.2.290.0120.00416.80
7.2.60.0000.01116.79
7.2.00.0030.00919.71
7.1.200.0090.00615.88
7.1.100.0090.00318.18
7.1.70.0030.01217.00
7.1.60.0110.01519.40
7.1.50.0140.01016.81
7.1.00.0000.07722.49
7.0.200.0040.00416.73
7.0.140.0030.07322.11
7.0.120.0030.07722.09
7.0.60.0200.07320.17
7.0.50.0030.06018.09
7.0.40.0070.08320.15
7.0.30.0500.07720.34
7.0.20.0230.05320.33
7.0.10.0330.07720.08
7.0.00.0100.08720.41
5.6.280.0070.07321.26
5.6.210.0100.08020.56
5.6.200.0100.07018.30
5.6.190.0100.04020.83
5.6.180.0100.08320.73
5.6.170.0430.06720.45
5.6.160.0000.04720.54
5.6.150.0070.03718.21
5.6.140.0070.05018.25
5.6.130.0100.04318.30
5.6.120.0030.09021.22
5.6.110.0070.07321.17
5.6.100.0100.05321.06
5.6.90.0030.04721.20
5.6.80.0100.07720.64
5.6.70.3630.03320.56
5.5.350.0170.05320.55
5.5.340.0100.05718.13
5.5.330.0100.04320.53
5.5.320.0230.04020.63
5.5.310.0200.06020.37
5.5.300.0030.04318.04
5.5.290.0070.09018.14
5.5.280.0100.05321.13
5.5.270.0030.08720.88
5.5.260.0070.05020.91
5.5.250.0070.04720.63
5.5.240.0100.07320.52
5.4.450.0130.05719.38
5.4.440.3900.03719.52
5.4.430.0100.05719.52
5.4.420.0200.05319.52
5.4.410.0170.06719.50
5.4.400.0170.07319.06
5.4.390.0100.06319.14
5.4.380.0130.06018.63
5.4.370.0100.03718.52
5.4.360.0070.04018.68
5.4.350.0040.04111.98
5.4.340.0100.03711.97
5.4.320.0090.05012.46
5.4.310.0040.04212.46
5.4.300.0100.05112.46
5.4.290.0110.05012.46
5.4.280.0080.04412.35
5.4.270.0080.04212.35
5.4.260.0110.04612.35
5.4.250.0080.04312.35
5.4.240.0070.04412.35
5.4.230.0060.04612.35
5.4.220.0090.04112.35
5.4.210.0100.04312.34
5.4.200.0090.04312.35
5.4.190.0070.04112.34
5.4.180.0050.04712.34
5.4.170.0110.05012.35
5.4.160.0110.04512.35
5.4.150.0100.04812.35
5.4.140.0080.04212.03
5.4.130.0050.04312.02
5.4.120.0100.04211.98
5.4.110.0070.04011.97
5.4.100.0060.04111.97
5.4.90.0070.04411.97
5.4.80.0080.04311.97
5.4.70.0080.04411.97
5.4.60.0090.04411.97
5.4.50.0070.04311.97
5.4.40.0070.04311.96
5.4.30.0070.04211.96
5.4.20.0070.04311.95
5.4.10.0080.04011.96
5.4.00.0090.04411.45
5.3.290.0080.04412.80
5.3.280.0110.05112.71
5.3.270.0090.05412.72
5.3.260.0110.05812.72
5.3.250.0090.05012.72
5.3.240.0090.04412.72
5.3.230.0090.03912.71
5.3.220.0100.03912.68
5.3.210.0090.04612.68
5.3.200.0090.04012.68
5.3.190.0070.04012.68
5.3.180.0070.03912.67
5.3.170.0060.04212.67
5.3.160.0080.03812.67
5.3.150.0090.04212.67
5.3.140.0090.04212.66
5.3.130.0080.03912.66
5.3.120.0080.04012.66
5.3.110.0100.04412.66
5.3.100.0080.04312.12
5.3.90.0080.04112.08
5.3.80.0090.04012.08
5.3.70.0080.04012.08
5.3.60.0090.04212.07
5.3.50.0070.04212.00
5.3.40.0050.04012.00

preferences:
46.34 ms | 401 KiB | 5 Q