3v4l.org

run code in 300+ PHP versions simultaneously
<?php function roundToValues( $search, array $arr ) { foreach($arr as $k=>$v){ echo "i:$k > s:$search\n"; if($k>$search){echo "true\n";} else{echo "false\n";} } } $arr = [ '0' => '0', '20' => '0-20', '50' => '20-50', '100' => '50-100', '200' => '100-200', '500' => '200-500' ]; var_dump( roundToValues('49.99',$arr) ); ?>

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.0130.00318.55
8.3.50.0100.00621.99
8.3.40.0070.00718.84
8.3.30.0070.00718.92
8.3.20.0040.00420.21
8.3.10.0040.00423.66
8.3.00.0060.00317.55
8.2.180.0060.01316.88
8.2.170.0100.01022.96
8.2.160.0030.01020.53
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0110.00726.16
8.2.120.0040.00421.10
8.2.110.0070.00322.29
8.2.100.0100.00317.91
8.2.90.0040.00417.63
8.2.80.0050.00317.97
8.2.70.0030.00618.03
8.2.60.0040.00418.04
8.2.50.0050.00318.10
8.2.40.0060.00322.15
8.2.30.0050.00518.07
8.2.20.0000.00717.76
8.2.10.0040.00418.11
8.2.00.0040.00417.63
8.1.280.0150.00025.92
8.1.270.0050.00322.23
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.95
8.1.230.0080.00318.97
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0090.00017.00
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0050.00318.46
8.1.160.0030.00521.98
8.1.150.0000.00818.87
8.1.140.0050.00217.46
8.1.130.0040.00417.51
8.1.120.0030.00317.51
8.1.110.0040.00417.41
8.1.100.0070.00017.48
8.1.90.0040.00417.34
8.1.80.0030.00317.47
8.1.70.0030.00317.38
8.1.60.0030.00517.54
8.1.50.0040.00417.47
8.1.40.0000.00717.49
8.1.30.0040.00417.49
8.1.20.0050.00317.71
8.1.10.0070.00017.41
8.1.00.0000.00817.48
8.0.300.0040.00419.67
8.0.290.0030.00616.63
8.0.280.0030.00318.44
8.0.270.0070.00017.24
8.0.260.0060.00016.90
8.0.250.0030.00316.97
8.0.240.0030.00316.98
8.0.230.0050.00316.88
8.0.220.0030.00316.91
8.0.210.0070.00016.82
8.0.200.0030.00316.95
8.0.190.0070.00016.97
8.0.180.0000.00716.92
8.0.170.0000.00716.83
8.0.160.0000.00717.00
8.0.150.0050.00316.84
8.0.140.0030.00616.76
8.0.130.0050.00013.25
8.0.120.0080.00016.85
8.0.110.0050.00316.81
8.0.100.0070.00016.79
8.0.90.0000.00716.89
8.0.80.0160.00616.86
8.0.70.0040.00316.77
8.0.60.0040.00416.80
8.0.50.0080.00016.95
8.0.30.0130.00617.10
8.0.20.0140.01617.40
8.0.10.0040.00417.13
8.0.00.0120.00716.76
7.4.330.0020.00215.10
7.4.320.0030.00316.51
7.4.300.0030.00316.52
7.4.290.0030.00616.38
7.4.280.0050.00516.50
7.4.270.0040.00416.53
7.4.260.0030.00616.46
7.4.250.0040.00416.33
7.4.240.0030.00316.51
7.4.230.0000.00716.42
7.4.220.0140.01216.58
7.4.210.0080.00616.70
7.4.200.0070.00016.55
7.4.160.0130.01016.45
7.4.150.0140.00317.40
7.4.140.0080.01017.86
7.4.130.0120.00916.51
7.4.120.0090.00816.47
7.4.110.0110.00716.47
7.4.100.0060.01116.49
7.4.90.0030.01316.49
7.4.80.0120.00619.39
7.4.70.0130.00316.62
7.4.60.0030.01416.36
7.4.50.0000.00616.32
7.4.40.0120.00416.38
7.4.30.0150.00616.72
7.4.00.0090.00714.99
7.3.330.0030.00313.37
7.3.320.0030.00313.37
7.3.310.0050.00216.36
7.3.300.0030.00316.33
7.3.290.0000.01416.37
7.3.280.0110.00616.35
7.3.270.0180.00617.40
7.3.260.0090.00916.47
7.3.250.0130.00616.47
7.3.240.0070.01516.46
7.3.230.0040.01216.63
7.3.210.0160.00016.42
7.3.200.0100.00719.39
7.3.190.0120.00816.51
7.3.180.0140.00316.31
7.3.170.0120.00616.36
7.3.160.0070.00716.40
7.3.120.0080.01014.79
7.3.110.0070.00914.85
7.3.100.0110.00614.81
7.3.90.0090.00614.81
7.3.80.0090.00614.81
7.3.70.0020.00814.60
7.3.60.0070.01014.85
7.3.50.0050.00914.79
7.3.40.0040.00814.75
7.3.30.0060.00714.81
7.3.20.0060.00716.63
7.3.10.0080.00716.68
7.3.00.0070.00616.65
7.2.330.0090.00916.41
7.2.320.0030.01416.75
7.2.310.0070.01416.39
7.2.300.0100.00716.65
7.2.290.0070.01016.68
7.2.250.0110.00715.02
7.2.240.0100.00715.00
7.2.230.0060.01015.10
7.2.220.0080.00614.96
7.2.210.0010.01315.24
7.2.200.0060.00714.92
7.2.190.0070.00815.09
7.2.180.0030.01214.93
7.2.170.0030.01014.94
7.2.160.0070.01014.75
7.2.150.0060.01017.03
7.2.140.0090.00316.74
7.2.130.0060.01017.04
7.2.120.0100.00317.01
7.2.110.0080.00416.96
7.2.100.0030.00916.95
7.2.90.0090.00617.02
7.2.80.0090.00917.14
7.2.70.0070.00717.01
7.2.60.0060.00916.80
7.2.50.0040.01416.67
7.2.40.0060.00917.00
7.2.30.0030.01217.00
7.2.20.0100.00616.88
7.2.10.0040.01216.96
7.2.00.0060.00618.05
7.1.330.0070.00815.67
7.1.320.0060.00515.80
7.1.310.0060.01015.79
7.1.300.0070.00515.76
7.1.290.0040.00915.82
7.1.280.0060.00715.70
7.1.270.0080.00715.74
7.1.260.0030.01215.59
7.1.250.0070.00315.82
7.1.100.0030.01017.95
7.1.70.0000.00917.13
7.1.60.0090.01619.25
7.1.50.0160.00016.77
7.1.00.0030.07722.35
7.0.200.0050.00216.72
7.0.140.0130.07022.18
7.0.110.0070.04020.03
7.0.100.0070.04720.04
7.0.90.0100.07019.93
7.0.80.0130.06720.09
7.0.70.0170.08020.05
7.0.60.0130.07719.98
7.0.50.0130.07720.37
7.0.40.0100.07020.13
7.0.30.0100.08319.96
7.0.20.0200.04320.24
7.0.10.0100.08020.03
7.0.00.0070.07020.02
5.6.280.0030.07320.89
5.6.260.0070.03720.90
5.6.250.0000.04320.70
5.6.240.0030.07020.70
5.6.230.0070.05020.71
5.6.220.0130.07720.62
5.6.210.0100.07320.62
5.6.200.0100.07721.20
5.6.190.0100.07721.20
5.6.180.0130.08021.27
5.6.170.0100.04321.22
5.6.160.0070.08321.27
5.6.150.0070.07321.06
5.6.140.0100.08021.03
5.6.130.0070.05321.03
5.6.120.0100.08020.96
5.6.110.0170.07320.95
5.6.100.0030.07721.11
5.6.90.0070.08720.87
5.6.80.0130.06720.34
5.6.70.0070.08020.64
5.6.60.0100.07320.57
5.6.50.0100.07020.30
5.6.40.0130.07720.50
5.6.30.0200.06320.63
5.6.20.0170.04320.55
5.6.10.0070.08720.64
5.6.00.0070.08320.37
5.5.380.0100.07720.54
5.5.370.0130.07320.36
5.5.360.0170.07320.37
5.5.350.0070.08720.46
5.5.340.0070.08021.04
5.5.330.0070.05020.75
5.5.320.0070.07721.03
5.5.310.0170.04320.81
5.5.300.0070.08021.04
5.5.290.0070.08321.02
5.5.280.0130.08020.71
5.5.270.0100.07720.98
5.5.260.0130.04720.96
5.5.250.0030.06320.68
5.5.240.0030.07720.23
5.5.230.0100.07020.22
5.5.220.0070.08020.41
5.5.210.0130.06720.42
5.5.200.0170.06720.20
5.5.190.0100.08020.30
5.5.180.0070.07020.20
5.5.160.0070.07720.31
5.5.150.0070.07320.25
5.5.140.0030.08020.37
5.5.130.0100.07320.22
5.5.120.0130.04320.30
5.5.110.0070.07320.16
5.5.100.0130.06720.00
5.5.90.0100.07019.99
5.5.80.0130.07020.14
5.5.70.0070.07720.20
5.5.60.0070.09720.24
5.5.50.0070.07319.97
5.5.40.0170.06320.24
5.5.30.0170.07020.02
5.5.20.0270.06320.03
5.5.10.0030.08320.18
5.5.00.0070.05020.03
5.4.450.0130.07319.51
5.4.440.0070.08319.57
5.4.430.0100.07319.36
5.4.420.0100.05319.27
5.4.410.0100.07319.17
5.4.400.0100.07319.01
5.4.390.0130.07019.09
5.4.380.0030.07719.23
5.4.370.0070.07319.00
5.4.360.0100.05319.14
5.4.350.0100.07719.11
5.4.340.0130.07318.96
5.4.320.0130.07318.96
5.4.310.0030.08019.20
5.4.300.0100.04319.18
5.4.290.0030.08319.09
5.4.280.0030.05019.03
5.4.270.0000.08019.18
5.4.260.0070.04319.01
5.4.250.0030.08318.95
5.4.240.0100.07319.00
5.4.230.0030.04019.22
5.4.220.0100.07319.00
5.4.210.0100.07318.97
5.4.200.0100.07019.09
5.4.190.0030.04319.23
5.4.180.0100.07319.23
5.4.170.0100.06018.94
5.4.160.0170.06018.96
5.4.150.0030.07018.98
5.4.140.0070.07316.53
5.4.130.0100.07316.54
5.4.120.0070.07316.46
5.4.110.0100.04316.51
5.4.100.0100.06716.54
5.4.90.0030.05016.66
5.4.80.0100.04316.41
5.4.70.0270.03316.55
5.4.60.0070.07316.44
5.4.50.0030.07316.44
5.4.40.0070.05316.68
5.4.30.0100.07016.38
5.4.20.0100.07316.44
5.4.10.0100.06716.33
5.4.00.0030.07015.79
5.3.290.0130.07314.63
5.3.280.0070.05714.59
5.3.270.0030.08314.64
5.3.260.0130.07014.46
5.3.250.0100.07014.63
5.3.240.0070.07314.61
5.3.230.0200.06314.70
5.3.220.0130.03714.54
5.3.210.0070.08014.54
5.3.200.0130.07014.59
5.3.190.0070.07714.56
5.3.180.0070.07714.54
5.3.170.0070.07714.59
5.3.160.0030.07714.52
5.3.150.0130.04014.42
5.3.140.0100.06714.60
5.3.130.0100.06714.55
5.3.120.0070.03714.69
5.3.110.0100.06714.56
5.3.100.0170.07714.04
5.3.90.0030.04314.04
5.3.80.0100.03013.99
5.3.70.0170.05714.00
5.3.60.0130.05314.00
5.3.50.0100.06313.94
5.3.40.0100.07013.93
5.3.30.0130.06713.91
5.3.20.0100.03713.71
5.3.10.0100.05013.78
5.3.00.0130.05313.64
5.2.170.0070.06311.85
5.2.160.0070.05711.85
5.2.150.0070.05011.85
5.2.140.0000.06711.85
5.2.130.0100.05711.85
5.2.120.0030.06311.85
5.2.110.0070.06011.85
5.2.100.0100.05711.85
5.2.90.0070.06011.85
5.2.80.0000.06311.85
5.2.70.0070.06011.85
5.2.60.0030.05311.85
5.2.50.0000.07011.85
5.2.40.0030.05711.85
5.2.30.0030.06311.85
5.2.20.0070.05011.85
5.2.10.0030.06011.85
5.2.00.0030.06311.85
5.1.60.0030.05711.85
5.1.50.0070.03311.85
5.1.40.0030.05311.85
5.1.30.0030.05011.85
5.1.20.0070.05011.85
5.1.10.0070.05311.85
5.1.00.0030.04711.85
5.0.50.0030.04311.85
5.0.40.0030.02011.85
5.0.30.0000.04311.85
5.0.20.0000.03011.85
5.0.10.0100.03711.85
5.0.00.0030.06311.85
4.4.90.0000.03311.85
4.4.80.0030.03711.85
4.4.70.0070.03011.85
4.4.60.0030.03311.85
4.4.50.0000.03711.85
4.4.40.0030.04311.85
4.4.30.0000.03711.85
4.4.20.0000.03711.85
4.4.10.0000.03711.85
4.4.00.0030.03711.85
4.3.110.0100.01711.85
4.3.100.0030.03711.85
4.3.90.0000.03711.85
4.3.80.0030.05311.85
4.3.70.0070.03011.85
4.3.60.0030.03311.85
4.3.50.0030.03011.85
4.3.40.0030.04311.85
4.3.30.0000.03311.85
4.3.20.0000.03711.85
4.3.10.0030.02311.85
4.3.00.0000.03711.85

preferences:
47.29 ms | 401 KiB | 5 Q