3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( "item1" => array( "conditions" => array( "foo" => true, ), ), "item2" => array( "conditions" => array( "foo" => true, ), ), "item3" => array( "conditions" => array( "foo" => true, ), ), "item4" => array( "conditions" => array( "foo" => false, ), ), "item5" => array( "conditions" => array( "foo" => false, ), ), "item6" => array( "conditions" => array( "foo" => false, ), ), "item7" => array(), "item8" => array(), "item9" => array(), ); $settings = array( "foo" => true, ); foreach($arr as $item_name => $item){ foreach($item["conditions"] as $key => $value){ if($settings[$key] == $value){ echo $item_name; } else { break; } } }

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.00916.88
8.3.50.0030.01418.30
8.3.40.0070.00718.53
8.3.30.0110.00318.66
8.3.20.0050.00320.20
8.3.10.0070.00021.95
8.3.00.0040.00419.25
8.2.180.0090.00918.66
8.2.170.0040.01122.96
8.2.160.0100.00322.12
8.2.150.0030.00624.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0040.00417.75
8.2.110.0060.00320.52
8.2.100.0040.00718.05
8.2.90.0070.00319.21
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0060.00318.03
8.2.50.0030.00518.07
8.2.40.0050.00219.13
8.2.30.0080.00020.64
8.2.20.0000.00817.71
8.2.10.0040.00418.13
8.2.00.0000.00818.05
8.1.280.0090.00625.92
8.1.270.0040.00423.79
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00722.56
8.1.230.0070.00717.65
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0090.00017.13
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0030.00518.52
8.1.160.0000.00721.97
8.1.150.0070.00018.90
8.1.140.0030.00519.50
8.1.130.0030.00317.70
8.1.120.0000.00717.44
8.1.110.0040.00417.33
8.1.100.0000.00717.36
8.1.90.0070.00017.44
8.1.80.0040.00417.46
8.1.70.0030.00517.30
8.1.60.0040.00417.52
8.1.50.0000.00817.52
8.1.40.0080.00017.57
8.1.30.0030.00517.58
8.1.20.0040.00417.67
8.1.10.0000.00817.50
8.1.00.0000.00717.52
8.0.300.0000.00918.77
8.0.290.0030.00616.75
8.0.280.0000.00818.45
8.0.270.0030.00317.14
8.0.260.0030.00317.23
8.0.250.0050.00217.00
8.0.240.0080.00016.98
8.0.230.0030.00316.96
8.0.220.0070.00016.83
8.0.210.0000.00716.96
8.0.200.0040.00416.96
8.0.190.0040.00416.96
8.0.180.0070.00017.04
8.0.170.0000.00716.88
8.0.160.0040.00417.03
8.0.150.0020.00516.87
8.0.140.0000.00816.95
8.0.130.0040.00413.41
8.0.120.0000.00716.81
8.0.110.0000.00716.93
8.0.100.0070.00017.00
8.0.90.0000.00716.96
8.0.80.0080.00817.02
8.0.70.0000.00717.07
8.0.60.0040.00416.77
8.0.50.0040.00416.83
8.0.30.0110.00917.23
8.0.20.0080.01217.40
8.0.10.0030.00517.05
8.0.00.0100.00716.83
7.4.330.0030.00315.09
7.4.320.0060.00016.51
7.4.300.0060.00016.59
7.4.290.0050.00316.52
7.4.280.0000.00816.59
7.4.270.0000.00716.63
7.4.260.0030.00616.36
7.4.250.0060.00316.48
7.4.240.0060.00216.51
7.4.230.0030.00316.33
7.4.220.0190.00016.68
7.4.210.0040.01116.71
7.4.200.0000.00816.32
7.4.160.0040.01216.80
7.4.150.0070.01017.40
7.4.140.0090.01217.86
7.4.130.0050.01616.54
7.4.120.0060.01116.63
7.4.110.0120.00616.64
7.4.100.0100.00716.48
7.4.90.0100.00616.54
7.4.80.0080.01119.39
7.4.70.0060.00916.59
7.4.60.0100.01416.65
7.4.50.0030.00516.55
7.4.40.0100.00616.51
7.4.30.0180.00416.44
7.4.00.0100.00314.84
7.3.330.0000.00513.15
7.3.320.0000.00513.16
7.3.310.0060.00016.45
7.3.300.0030.00316.40
7.3.290.0070.00816.35
7.3.280.0100.00816.27
7.3.270.0030.01517.40
7.3.260.0110.00616.40
7.3.250.0120.00716.43
7.3.240.0100.00916.41
7.3.230.0050.01916.39
7.3.210.0060.01316.44
7.3.200.0120.00616.44
7.3.190.0110.00516.45
7.3.180.0080.00816.42
7.3.170.0040.01316.53
7.3.160.0090.00616.54
7.2.330.0110.00716.77
7.2.320.0110.01116.71
7.2.310.0130.00516.69
7.2.300.0140.00416.48
7.2.290.0120.00616.43
7.2.00.0070.00319.43
7.1.100.0070.00718.11
7.1.70.0000.01016.75
7.1.60.0070.01719.43
7.1.50.0230.01334.70
7.1.00.0070.07722.41
7.0.200.2420.00314.59
7.0.60.0100.05720.04
7.0.50.0130.07717.86
7.0.40.0070.07720.30
7.0.30.0170.06020.33
7.0.20.0370.03720.20
7.0.10.0070.09020.20
7.0.00.0130.07720.09
5.6.280.0030.04321.07
5.6.210.0070.04320.64
5.6.200.0070.08018.23
5.6.190.0030.04720.41
5.6.180.0470.03720.33
5.6.170.0370.05020.62
5.6.160.0070.06320.50
5.6.150.0030.04018.16
5.6.140.0070.08018.20
5.6.130.0030.07718.13
5.6.120.0100.04721.12
5.6.110.0170.07721.13
5.6.100.0130.07320.96
5.6.90.0100.07320.99
5.6.80.0130.08020.37
5.5.350.0300.07720.49
5.5.340.0100.08017.98
5.5.330.0030.08720.23
5.5.320.0170.08320.19
5.5.310.0270.07720.13
5.5.300.0100.07317.94
5.5.290.0230.06718.00
5.5.280.0070.05320.79
5.5.270.0100.05320.75
5.5.260.0100.08020.76
5.5.250.0100.06320.79
5.5.240.0030.06720.03
5.4.450.0200.05019.48
5.4.440.0200.05319.58
5.4.430.0100.06019.45
5.4.420.0300.04019.54
5.4.410.0200.05019.27
5.4.400.0100.05719.00
5.4.390.0170.05318.77
5.4.380.0200.06718.80
5.4.370.0200.05319.20
5.4.360.0070.07019.08
5.4.350.0100.06719.15
5.4.340.0300.05018.94
5.4.320.0100.06719.05
5.4.310.0170.05318.77
5.4.300.0230.04719.15
5.4.290.0270.05719.27
5.4.280.0200.05719.30
5.4.270.0270.04319.25
5.4.260.0170.05019.16
5.4.250.0130.05718.77
5.4.240.0170.05019.18
5.4.230.0130.06019.15
5.4.220.0330.04319.14
5.4.210.0070.06018.80
5.4.200.0200.04718.93
5.4.190.0100.05718.81
5.4.180.0200.04718.93
5.4.170.0200.04719.20
5.4.160.0230.04319.23
5.4.150.0270.04719.12
5.4.140.0230.04016.29
5.4.130.0170.05016.30
5.4.120.0270.03316.60
5.4.110.0200.04316.18
5.4.100.0170.04716.55
5.4.90.0170.04316.49
5.4.80.0070.05316.40
5.4.70.0370.04016.43
5.4.60.0130.05016.43
5.4.50.0100.05016.48
5.4.40.0200.04716.45
5.4.30.0130.05016.43
5.4.20.0170.05316.46
5.4.10.0130.05716.54
5.4.00.0100.05715.67

preferences:
45.1 ms | 400 KiB | 5 Q