3v4l.org

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

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.40.0090.00618.59
8.3.30.0140.00018.90
8.3.20.0040.00420.16
8.3.10.0070.00023.66
8.3.00.0090.00017.80
8.2.170.0080.01222.96
8.2.160.0070.00720.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00321.09
8.2.110.0060.00320.38
8.2.100.0070.00318.09
8.2.90.0030.00719.22
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0030.00617.80
8.2.50.0060.00618.07
8.2.40.0000.00818.22
8.2.30.0070.00418.09
8.2.20.0050.00317.56
8.2.10.0000.00718.00
8.2.00.0040.00417.73
8.1.270.0030.00622.10
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0070.00323.84
8.1.230.0080.00419.07
8.1.220.0070.00017.74
8.1.210.0030.00618.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0080.00018.62
8.1.160.0050.00222.05
8.1.150.0030.00618.88
8.1.140.0040.00417.45
8.1.130.0030.00317.73
8.1.120.0040.00417.43
8.1.110.0040.00417.45
8.1.100.0030.00517.36
8.1.90.0050.00317.42
8.1.80.0000.00717.43
8.1.70.0030.00317.42
8.1.60.0030.00517.57
8.1.50.0040.00417.52
8.1.40.0090.00017.42
8.1.30.0040.00417.59
8.1.20.0040.00417.62
8.1.10.0000.00717.41
8.1.00.0000.00717.35
8.0.300.0040.00418.77
8.0.290.0030.00716.63
8.0.280.0000.00718.44
8.0.270.0040.00417.21
8.0.260.0030.00317.27
8.0.250.0050.00217.04
8.0.240.0030.00316.96
8.0.230.0000.00716.85
8.0.220.0000.00616.75
8.0.210.0000.00716.93
8.0.200.0060.00016.84
8.0.190.0000.00817.01
8.0.180.0000.00716.84
8.0.170.0050.00316.82
8.0.160.0030.00316.90
8.0.150.0040.00416.74
8.0.140.0030.00516.85
8.0.130.0060.00013.25
8.0.120.0080.00016.76
8.0.110.0050.00216.85
8.0.100.0000.00716.84
8.0.90.0070.00016.93
8.0.80.0030.01316.81
8.0.70.0000.00816.82
8.0.60.0040.00316.86
8.0.50.0000.00816.87
8.0.30.0050.01417.08
8.0.20.0040.01517.43
8.0.10.0050.00317.04
8.0.00.0090.00916.94
7.4.330.0020.00315.15
7.4.320.0030.00316.60
7.4.300.0040.00416.61
7.4.290.0040.00416.64
7.4.280.0080.00016.59
7.4.270.0040.00416.51
7.4.260.0030.00316.50
7.4.250.0030.00316.58
7.4.240.0030.00516.53
7.4.230.0000.00716.51
7.4.220.0060.01616.61
7.4.210.0050.00916.55
7.4.200.0000.00716.48
7.4.160.0080.00816.43
7.4.150.0170.00017.40
7.4.140.0070.01017.86
7.4.130.0140.00316.45
7.4.120.0090.00916.44
7.4.110.0060.01216.39
7.4.100.0140.00516.44
7.4.90.0090.00916.30
7.4.80.0130.00319.39
7.4.70.0110.00616.43
7.4.60.0110.00716.43
7.4.50.0030.00616.39
7.4.40.0030.01616.47
7.4.30.0030.01416.50
7.4.10.0030.01414.81
7.4.00.0070.01015.04
7.3.330.0030.00313.07
7.3.320.0050.00013.19
7.3.310.0000.00616.18
7.3.300.0030.00316.38
7.3.290.0110.00316.24
7.3.280.0050.01316.34
7.3.270.0060.01217.40
7.3.260.0070.01016.34
7.3.250.0030.01416.38
7.3.240.0030.01416.52
7.3.230.0060.00916.53
7.3.210.0100.00716.69
7.3.200.0200.00019.39
7.3.190.0120.00916.28
7.3.180.0100.00616.48
7.3.170.0100.01016.27
7.3.160.0120.00416.38
7.3.130.0090.00914.74
7.3.120.0090.00715.09
7.3.110.0100.00814.95
7.3.100.0050.00815.03
7.3.90.0070.00914.84
7.3.80.0050.00914.81
7.3.70.0070.00714.83
7.3.60.0090.00714.84
7.3.50.0070.00614.86
7.3.40.0070.00914.81
7.3.30.0040.01014.61
7.3.20.0140.00216.57
7.3.10.0090.00716.57
7.3.00.0080.00916.40
7.2.330.0080.00916.34
7.2.320.0090.00916.64
7.2.310.0090.01216.59
7.2.300.0130.00416.79
7.2.290.0060.01016.36
7.2.260.0120.00415.22
7.2.250.0100.00614.94
7.2.240.0080.00815.04
7.2.230.0100.00415.21
7.2.220.0020.01314.85
7.2.210.0040.01114.98
7.2.200.0050.00815.10
7.2.190.0050.01014.96
7.2.180.0070.00914.85
7.2.170.0070.00715.17
7.2.160.0080.00414.85
7.2.150.0050.01016.93
7.2.140.0060.00816.88
7.2.130.0040.01016.68
7.2.120.0050.01116.79
7.2.110.0070.01016.88
7.2.100.0080.00616.76
7.2.90.0060.00916.78
7.2.80.0070.01016.75
7.2.70.0050.01316.80
7.2.60.0070.01016.68
7.2.50.0080.00916.70
7.2.40.0060.00816.88
7.2.30.0070.00916.68
7.2.20.0080.00716.79
7.2.10.0080.00816.84
7.2.00.0080.00617.31
7.1.330.0060.00815.75
7.1.320.0040.00815.87
7.1.310.0050.00715.94
7.1.300.0070.00615.79
7.1.290.0070.00815.89
7.1.280.0070.00615.74
7.1.270.0030.01115.60
7.1.260.0060.00915.77
7.1.250.0100.00415.85
7.1.240.0070.00715.75
7.1.230.0070.00315.93
7.1.220.0000.01415.61
7.1.210.0030.00715.95
7.1.200.0080.00415.62
7.1.190.0070.00715.56
7.1.180.0100.00615.56
7.1.170.0060.01015.70
7.1.160.0000.01315.77
7.1.150.0000.01715.70
7.1.140.0040.00415.65
7.1.130.0040.01115.47
7.1.120.0030.01015.70
7.1.110.0080.00415.74
7.1.100.0050.00816.85
7.1.90.0040.01215.42
7.1.80.0110.00415.64
7.1.70.0010.00816.31
7.1.60.0050.01217.61
7.1.50.0080.00516.16
7.1.40.0040.00815.55
7.1.30.0000.00915.75
7.1.20.0070.00315.88
7.1.10.0100.00315.68
7.1.00.0070.04219.11
7.0.330.0060.00915.40
7.0.320.0110.00415.36
7.0.310.0040.00815.52
7.0.300.0030.01015.38
7.0.290.0030.00715.41
7.0.280.0110.00415.48
7.0.270.0040.01115.20
7.0.260.0000.01415.41
7.0.250.0030.01015.36
7.0.240.0080.00815.42
7.0.230.0030.01215.40
7.0.220.0030.01015.47
7.0.210.0030.01015.43
7.0.200.0040.00716.03
7.0.190.0070.00715.54
7.0.180.0110.00415.46
7.0.170.0030.01015.11
7.0.160.0040.00715.52
7.0.150.0040.01115.61
7.0.140.0030.03318.71
7.0.130.0070.01015.50
7.0.120.0030.01015.47
7.0.110.0080.00415.52
7.0.100.0060.00615.24
7.0.90.0080.00815.60
7.0.80.0070.00715.04
7.0.70.0000.01015.04
7.0.60.0070.04217.77
7.0.50.0090.04016.58
7.0.40.0060.02216.90
7.0.30.0100.02616.74
7.0.20.0100.04516.88
7.0.10.0050.02416.83
7.0.00.0100.04016.75
5.6.400.0000.00814.39
5.6.390.0100.00714.55
5.6.380.0070.00714.56
5.6.370.0110.00414.57
5.6.360.0000.01114.65
5.6.350.0000.00814.16
5.6.340.0040.01114.54
5.6.330.0000.01414.51
5.6.320.0110.00414.39
5.6.310.0030.01314.11
5.6.300.0040.00814.45
5.6.290.0040.01414.73
5.6.280.0070.04017.61
5.6.270.0080.00614.60
5.6.260.0100.00014.23
5.6.250.0040.01214.27
5.6.240.0030.01014.08
5.6.230.0060.00614.28
5.6.220.0070.00714.50
5.6.210.0110.01917.56
5.6.200.0050.03316.28
5.6.190.0030.02517.26
5.6.180.0140.02917.37
5.6.170.0150.03017.49
5.6.160.0110.02217.18
5.6.150.0100.04216.17
5.6.140.0040.02516.29
5.6.130.0050.04216.10
5.6.120.0090.01817.70
5.6.110.0130.03817.70
5.6.100.0070.02517.67
5.6.90.0090.04217.56
5.6.80.0070.04217.29
5.6.70.0070.01014.06
5.6.60.0080.00414.38
5.6.50.0030.00914.23
5.6.40.0030.01314.32
5.6.30.0040.00814.21
5.6.20.0140.00314.13
5.6.10.0060.00914.23
5.6.00.0000.01414.03
5.5.380.0040.00714.20
5.5.370.0070.00714.25
5.5.360.0070.01014.15
5.5.350.0150.04017.37
5.5.340.0080.02016.13
5.5.330.0000.02817.44
5.5.320.0160.03917.35
5.5.310.0150.04717.21
5.5.300.0030.04616.01
5.5.290.0080.04516.22
5.5.280.0050.02517.48
5.5.270.0080.03317.42
5.5.260.0030.03817.53
5.5.250.0070.04717.42
5.5.240.0020.02417.24
5.5.230.0030.01413.94
5.5.220.0070.00714.21
5.5.210.0110.00413.94
5.5.200.0100.00314.20
5.5.190.0000.01014.06
5.5.180.0040.01414.29
5.5.170.0060.00914.32
5.5.160.0050.00514.38
5.5.150.0040.01114.17
5.5.140.0070.01014.04
5.5.130.0090.00614.36
5.5.120.0060.00314.43
5.5.110.0000.01014.39
5.5.100.0030.01113.96
5.5.90.0040.01214.19
5.5.80.0030.01314.39
5.5.70.0040.00814.40
5.5.60.0060.00614.26
5.5.50.0030.01014.14
5.5.40.0030.00714.05
5.5.30.0070.00713.98
5.5.20.0000.01014.40
5.5.10.0030.00614.30
5.5.00.0060.01014.22
5.4.450.0400.03015.38
5.4.440.0350.03415.32
5.4.430.0230.03515.56
5.4.420.0360.03315.57
5.4.410.0080.02915.30
5.4.400.0410.03015.21
5.4.390.0380.02515.40
5.4.380.0130.02715.06
5.4.370.0070.03415.10
5.4.360.0110.02815.02
5.4.350.0030.02411.74
5.4.340.0040.02211.74
5.4.330.0100.00311.50
5.4.320.0070.01911.98
5.4.310.0060.03011.98
5.4.300.0080.02111.98
5.4.290.0100.02111.98
5.4.280.0060.02311.93
5.4.270.0040.02111.93
5.4.260.0070.02111.93
5.4.250.0050.02311.92
5.4.240.0050.02111.93
5.4.230.0040.02311.92
5.4.220.0020.02411.92
5.4.210.0060.02011.92
5.4.200.0040.02311.92
5.4.190.0070.02511.92
5.4.180.0060.01911.92
5.4.170.0040.02411.93
5.4.160.0060.02211.92
5.4.150.0050.02311.92
5.4.140.0060.02011.76
5.4.130.0060.01911.76
5.4.120.0040.02211.74
5.4.110.0040.02311.73
5.4.100.0070.01811.73
5.4.90.0060.01911.73
5.4.80.0040.02211.73
5.4.70.0050.02111.73
5.4.60.0070.02411.73
5.4.50.0040.02011.73
5.4.40.0040.02611.72
5.4.30.0040.02211.73
5.4.20.0020.02211.72
5.4.10.0040.02311.72
5.4.00.0060.02111.47
5.3.290.0050.02212.15
5.3.280.0040.02312.10
5.3.270.0040.02512.11
5.3.260.0050.02412.11
5.3.250.0060.02312.11
5.3.240.0080.02012.11
5.3.230.0040.02612.11
5.3.220.0050.02412.09
5.3.210.0050.02512.09
5.3.200.0050.02212.09
5.3.190.0040.02012.09
5.3.180.0060.02212.09
5.3.170.0080.02212.09
5.3.160.0080.02112.08
5.3.150.0060.01912.09
5.3.140.0090.02012.08
5.3.130.0050.02612.08
5.3.120.0060.02312.08
5.3.110.0080.02112.08
5.3.100.0060.02311.81
5.3.90.0070.01811.79
5.3.80.0040.02511.79
5.3.70.0060.02011.79
5.3.60.0060.02111.78
5.3.50.0040.02411.75
5.3.40.0040.02211.75
5.3.30.0070.01911.72
5.3.20.0060.02211.61
5.3.10.0060.02211.60
5.3.00.0040.02511.59
5.2.170.0030.0339.18
5.2.160.0030.0329.18
5.2.150.0080.0289.18
5.2.140.0070.0299.18
5.2.130.0040.0339.13
5.2.120.0080.0259.14
5.2.110.0090.0349.15
5.2.100.0070.0299.14
5.2.90.0060.0289.14
5.2.80.0040.0369.14
5.2.70.0040.0329.14
5.2.60.0110.0359.09
5.2.50.0090.0459.05
5.2.40.0110.0349.03
5.2.30.0080.0389.01
5.2.20.0040.0389.01
5.2.10.0030.0348.93
5.2.00.0040.0328.79
5.1.60.0060.0228.07
5.1.50.0040.0268.07
5.1.40.0050.0248.05
5.1.30.0030.0288.40
5.1.20.0040.0288.42
5.1.10.0050.0248.14
5.1.00.0030.0268.14
5.0.50.0030.0216.63
5.0.40.0040.0206.48
5.0.30.0070.0316.29
5.0.20.0010.0216.26
5.0.10.0060.0176.25
5.0.00.0050.0296.23
4.4.90.0040.0154.78
4.4.80.0040.0144.75
4.4.70.0010.0184.75
4.4.60.0020.0174.76
4.4.50.0050.0144.77
4.4.40.0030.0264.71
4.4.30.0020.0164.75
4.4.20.0020.0164.84
4.4.10.0020.0164.85
4.4.00.0040.0244.76
4.3.110.0030.0154.67
4.3.100.0050.0124.66
4.3.90.0030.0154.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0010.0164.63
4.3.50.0030.0154.63
4.3.40.0050.0254.54
4.3.30.0020.0163.29
4.3.20.0010.0173.25
4.3.10.0020.0163.22
4.3.00.0100.0237.20

preferences:
42.06 ms | 400 KiB | 5 Q