3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomFloat($min = 0, $max = 1) { return number_format($min + mt_rand() / mt_getrandmax() * ($max - $min), 2, '.', ''); // 2 decimal places } echo randomFloat(1,2);

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.2.110.0110.00822.27
8.1.70.0030.00617.29
8.1.60.0180.00017.57
8.1.50.0100.00317.36
8.1.40.0110.00517.45
8.1.30.0150.00417.53
8.1.20.0110.00717.56
8.1.10.0120.00317.50
8.1.00.0110.00717.39
8.0.270.0030.00517.15
8.0.200.0130.00316.89
8.0.190.0120.00416.86
8.0.180.0160.00016.88
8.0.170.0080.00816.70
8.0.160.0110.00616.86
8.0.150.0130.00316.77
8.0.140.0120.00316.72
8.0.130.0160.00016.72
8.0.120.0100.00516.80
8.0.110.0050.01016.81
8.0.100.0140.00316.82
8.0.90.0120.00416.66
8.0.80.0150.00016.73
8.0.70.0110.00316.77
8.0.60.0110.00416.64
8.0.50.0100.00316.74
8.0.30.0070.00316.76
8.0.20.0050.01016.79
8.0.10.0070.00716.93
8.0.00.0040.00416.98
7.4.300.0000.00816.46
7.4.290.0090.00516.54
7.4.280.0170.00016.58
7.4.270.0080.00516.46
7.4.260.0110.00316.56
7.4.250.0080.00516.55
7.4.240.0110.00016.40
7.4.230.0130.00316.54
7.4.220.0140.00016.56
7.4.210.0140.00016.52
7.4.200.0000.01316.54
7.4.190.0100.00316.49
7.4.180.0120.00416.46
7.4.160.0070.00716.63
7.4.150.0080.00816.52
7.4.140.0110.00416.34
7.4.130.0150.00016.42
7.4.120.0060.00916.34
7.4.110.0120.00316.39
7.4.100.0030.01016.43
7.4.90.0110.00416.33
7.4.80.0140.00016.43
7.4.70.0130.00516.42
7.4.60.0110.00716.42
7.4.50.0070.01116.32
7.4.40.0120.00616.37
7.4.30.0110.00716.19
7.4.20.0090.00816.35
7.4.10.0070.00816.31
7.4.00.0090.00616.46
7.3.330.0110.00416.34
7.3.320.0100.00516.16
7.3.310.0110.00416.34
7.3.300.0070.00716.29
7.3.290.0070.00716.44
7.3.280.0120.00316.31
7.3.270.0140.00016.31
7.3.260.0110.00316.34
7.3.250.0120.00216.20
7.3.240.0120.00216.19
7.3.230.0090.00616.39
7.3.220.0150.00016.27
7.3.210.0090.00516.32
7.3.200.0130.00316.10
7.3.190.0130.00516.39
7.3.180.0090.00816.52
7.3.170.0110.00616.45
7.3.160.0110.00716.39
7.3.150.0120.00416.41
7.3.140.0090.00816.37
7.3.130.0080.00816.39
7.3.120.0100.00616.38
7.3.110.0050.01216.41
7.3.100.0120.00616.38
7.3.90.0100.00916.45
7.3.80.0080.01116.44
7.3.70.0130.00416.42
7.3.60.0100.00616.42
7.3.50.0080.00916.46
7.3.40.0110.00716.41
7.3.30.0130.00616.43
7.3.20.0080.00916.87
7.3.10.0100.00816.88
7.3.00.0110.00816.90
7.2.340.0100.00316.23
7.2.330.0100.00616.39
7.2.320.0030.00716.39
7.2.310.0070.00916.47
7.2.300.0090.00916.47
7.2.290.0110.00716.51
7.2.280.0090.00816.57
7.2.270.0100.00816.46
7.2.260.0090.00716.49
7.2.250.0110.00716.43
7.2.240.0080.00916.40
7.2.230.0070.01116.46
7.2.220.0130.00616.29
7.2.210.0110.00816.46
7.2.200.0130.00516.55
7.2.190.0080.01016.64
7.2.180.0090.00816.44
7.2.170.0110.00716.44
7.2.160.0080.01016.56
7.2.150.0090.00917.02
7.2.140.0110.00617.03
7.2.130.0120.00617.00
7.2.120.0070.00917.06
7.2.110.0360.00816.13
7.2.100.0270.00916.08
7.2.90.0280.00516.11
7.2.80.0270.00916.15
7.2.70.0290.00916.23
7.2.60.0280.00816.15
7.2.50.0160.00916.25
7.2.40.0310.00716.21
7.2.30.0270.00716.17
7.2.20.0370.01016.24
7.2.10.0340.00616.24
7.2.00.0270.00916.14
7.1.330.0120.01116.02
7.1.320.0140.01116.08
7.1.310.0150.01016.00
7.1.300.0160.00716.07
7.1.290.0130.01015.96
7.1.280.0200.00616.05
7.1.270.0130.00916.02
7.1.260.0160.00815.98
7.1.250.0150.00715.93
7.1.240.0150.00915.87
7.1.230.0390.00915.25
7.1.220.0330.00615.28
7.1.210.0300.01015.16
7.1.200.0340.00615.15
7.1.190.0320.00915.18
7.1.180.0150.01115.20
7.1.170.0180.01215.25
7.1.160.0400.00815.11
7.1.150.0380.00815.21
7.1.140.0460.00815.19
7.1.130.0400.00715.24
7.1.120.0320.01015.11
7.1.110.0370.00715.18
7.1.100.0330.00815.21
7.1.90.0290.00915.18
7.1.80.0310.00615.17
7.1.70.0300.00815.11
7.1.60.0540.00721.14
7.1.50.0390.00921.20
7.1.40.0400.00821.26
7.1.30.0430.00821.22
7.1.20.0420.00821.21
7.1.10.0350.01015.21
7.1.00.0320.00915.19
7.0.330.0190.01015.67
7.0.320.0180.00815.73
7.0.310.0220.00515.62
7.0.300.0220.00615.62
7.0.290.0290.00415.69
7.0.280.0150.01015.68
7.0.270.0200.00615.64
7.0.260.0170.00815.67
7.0.250.0230.01115.75
7.0.240.0170.01115.78
7.0.230.0170.00915.72
7.0.220.0190.00715.76
7.0.210.0160.00815.68
7.0.200.0150.01015.70
7.0.190.0210.00615.73
7.0.180.0180.00715.73
7.0.170.0180.00715.74
7.0.160.0200.00715.72
7.0.150.0170.00715.64
7.0.140.0170.00715.77
7.0.130.0160.01015.69
7.0.120.0180.00715.82
7.0.110.0190.00615.65
7.0.100.0160.00815.67
7.0.90.0200.00515.70
7.0.80.0180.00815.67
7.0.70.0200.00815.60
7.0.60.0200.00815.68
7.0.50.0190.00815.61
7.0.40.0180.00715.66
7.0.30.0180.00815.69
7.0.20.0180.00615.65
7.0.10.0180.00915.64
7.0.00.0170.00915.63
5.6.400.0220.00915.88
5.6.390.0210.00715.95
5.6.380.0150.01015.18
5.6.370.0170.01115.96
5.6.360.0190.00915.94
5.6.350.0200.00816.00
5.6.340.0200.00915.91
5.6.330.0190.00715.90
5.6.320.0190.01015.85
5.6.310.0200.00715.92
5.6.300.0120.01515.85
5.6.290.0170.00915.95
5.6.280.0180.01015.82
5.6.270.0150.01115.96
5.6.260.0170.00915.90
5.6.250.0180.00815.91
5.6.240.0200.00715.92
5.6.230.0170.01015.86
5.6.220.0180.00915.99
5.6.210.0220.01115.91
5.6.200.0230.00915.92
5.6.190.0210.00715.96
5.6.180.0180.01115.91
5.6.170.0160.01315.90
5.6.160.0220.00715.77
5.6.150.0190.01115.96
5.6.140.0190.01115.76
5.6.130.0150.01415.98
5.6.120.0170.00915.86
5.6.110.0180.01115.95
5.6.100.0200.01015.85
5.6.90.0220.00715.87
5.6.80.0160.00915.72
5.6.70.0180.00815.80
5.6.60.0230.00615.79
5.6.50.0220.00615.79
5.6.40.0170.00815.78
5.6.30.0160.01015.77
5.6.20.0180.00915.77
5.6.10.0160.01015.79
5.6.00.0150.01115.77

preferences:
57.39 ms | 1460 KiB | 5 Q