3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array( 'type' => 'checkbox', 'id' => 'f0', 'is_active' => 1 ), array( 'type' => 'checkbox', 'id' => 'f1', 'is_active' => 0 ), array( 'type' => 'radio', 'id' => 'f2', 'is_active' => 0 ), array( 'type' => 'checkbox', 'id' => 'f3', 'is_active' => 1 ), array( 'type' => 'text', 'id' => 'f4', 'is_active' => 1 ) ); $filtered = array_reduce($array, function($a,$b){ if($b['type'] == 'checkbox' && $b['is_active'] == 1){ $a[] = $b; return $a; }else{ return $a; }},[]); print_r($filtered);

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.5.10.0100.00719.70
8.5.00.0130.00820.03
8.4.150.0010.00114.05
8.4.140.0160.00617.71
8.4.130.0070.00318.89
8.4.120.0100.00624.06
8.4.110.0090.01120.35
8.4.100.0090.01218.82
8.4.90.0090.00720.91
8.4.80.0060.00318.93
8.4.70.0070.00518.01
8.4.60.0090.01218.57
8.4.50.0030.00619.40
8.4.40.0060.01319.59
8.4.30.0150.00420.42
8.4.20.0070.00320.34
8.4.10.0100.00019.52
8.3.280.0100.01018.50
8.3.270.0090.01016.67
8.3.260.0150.00616.64
8.3.250.0120.00619.00
8.3.240.0050.00317.07
8.3.230.0110.00916.83
8.3.220.0090.00918.78
8.3.210.0030.00416.52
8.3.200.0040.00516.86
8.3.190.0060.00319.02
8.3.180.0040.00516.64
8.3.170.0120.00818.88
8.3.160.0100.00716.53
8.3.150.0070.00720.55
8.3.140.0090.00916.65
8.3.130.0060.00316.91
8.3.120.0090.00920.88
8.3.110.0000.00820.94
8.3.100.0060.00324.06
8.3.90.0050.00326.77
8.3.80.0060.00618.55
8.3.70.0120.00916.63
8.3.60.0110.00418.55
8.3.50.0080.00718.42
8.3.40.0110.00318.97
8.3.30.0070.00718.63
8.3.20.0000.00821.02
8.3.10.0080.00023.57
8.3.00.0040.00420.68
8.2.290.0060.00920.61
8.2.280.0110.00818.48
8.2.270.0090.00917.50
8.2.260.0040.00419.96
8.2.250.0030.00616.91
8.2.240.0040.00717.17
8.2.230.0070.00322.58
8.2.220.0000.00837.54
8.2.210.0070.00026.77
8.2.200.0060.00318.88
8.2.190.0000.01618.41
8.2.180.0140.00718.29
8.2.170.0000.01422.96
8.2.160.0060.01222.25
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0070.00026.16
8.2.110.0060.00322.11
8.2.100.0040.00818.03
8.2.90.0030.00617.79
8.2.80.0040.00419.08
8.2.70.0060.00317.93
8.2.60.0000.00718.28
8.2.50.0040.00418.10
8.2.40.0030.00619.45
8.2.30.0050.00318.04
8.2.20.0000.00718.04
8.2.10.0050.00219.05
8.2.00.0070.00019.39
8.1.330.0110.00921.99
8.1.320.0110.00816.13
8.1.310.0090.00016.70
8.1.300.0030.00616.20
8.1.290.0070.00430.84
8.1.280.0000.01625.92
8.1.270.0030.00622.60
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00917.48
8.1.230.0070.00420.90
8.1.220.0050.00317.74
8.1.210.0080.00018.79
8.1.200.0050.00517.47
8.1.190.0030.00617.35
8.1.180.0050.00318.10
8.1.170.0040.00418.71
8.1.160.0040.00418.94
8.1.150.0000.00718.82
8.1.140.0030.00518.89
8.1.130.0000.00720.14
8.1.120.0060.00317.37
8.1.110.0000.00717.46
8.1.100.0070.00017.36
8.1.90.0040.00417.48
8.1.80.0000.00717.52
8.1.70.0000.00717.48
8.1.60.0000.00717.56
8.1.50.0080.00017.45
8.1.40.0040.00417.41
8.1.30.0050.00317.70
8.1.20.0070.00017.70
8.1.10.0030.00517.55
8.1.00.0040.00417.47
8.0.300.0040.00420.07
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0000.00817.37
8.0.260.0070.00019.98
8.0.250.0000.00716.97
8.0.240.0000.00716.87
8.0.230.0030.00316.97
8.0.220.0030.00316.95
8.0.210.0030.00316.91
8.0.200.0030.00316.96
8.0.190.0000.00716.82
8.0.180.0040.00416.92
8.0.170.0040.00416.85
8.0.160.0030.00316.88
8.0.150.0040.00416.79
8.0.140.0030.00516.74
8.0.130.0040.00413.35
8.0.120.0040.00416.74
8.0.110.0000.00716.75
8.0.100.0040.00416.76
8.0.90.0000.00916.67
8.0.80.0090.00616.89
8.0.70.0050.00216.89
8.0.60.0000.00716.88
8.0.50.0000.00716.90
8.0.30.0100.00717.10
8.0.20.0140.00616.97
8.0.10.0050.00316.86
8.0.00.0060.01316.68
7.4.330.0030.00315.55
7.4.320.0000.00616.61
7.4.300.0030.00316.62
7.4.290.0000.00716.57
7.4.280.0080.00016.57
7.4.270.0070.00016.61
7.4.260.0050.00013.32
7.4.250.0030.00316.54
7.4.240.0030.00316.61
7.4.230.0030.00316.60
7.4.220.0050.00216.48
7.4.210.0090.00816.59
7.4.200.0030.00316.50
7.4.130.0140.00416.57
7.4.120.0070.01416.54
7.4.110.0070.01116.48
7.4.100.0120.00616.52
7.4.90.0090.00916.48
7.4.80.0130.00319.39
7.4.70.0080.00816.60
7.4.60.0060.01016.59
7.4.50.0090.00616.12
7.4.40.0100.00616.29
7.4.00.0080.00815.01
7.3.330.0000.00816.37
7.3.320.0050.00013.32
7.3.310.0000.00716.31
7.3.300.0030.00316.27
7.3.290.0000.00716.13
7.3.280.0060.01216.28
7.3.260.0140.00516.44
7.3.240.0050.01216.44
7.3.230.0100.01016.19
7.3.210.0050.01016.44
7.3.200.0060.01016.64
7.3.190.0120.00616.48
7.3.180.0080.00816.32
7.3.170.0070.01416.62
7.3.160.0060.01016.57
7.3.120.0140.00514.77
7.3.110.0090.00614.90
7.3.100.0080.00714.87
7.3.90.0070.00614.79
7.3.80.0060.00814.72
7.3.70.0040.00814.87
7.3.60.0100.00514.79
7.3.50.0070.00714.74
7.3.40.0060.00714.81
7.3.30.0060.00714.69
7.3.20.0040.00915.90
7.3.10.0080.00516.07
7.3.00.0040.01115.87
7.2.330.0090.00816.60
7.2.320.0140.00316.63
7.2.310.0070.01116.64
7.2.300.0070.01016.44
7.2.290.0030.01916.66
7.2.250.0040.01415.04
7.2.240.0070.01115.04
7.2.230.0060.01014.99
7.2.220.0060.00614.96
7.2.210.0080.00815.00
7.2.200.0030.01015.00
7.2.190.0070.00714.85
7.2.180.0060.00514.93
7.2.170.0090.00514.95
7.2.160.0060.01114.89
7.2.150.0080.00615.21
7.2.140.0090.00614.83
7.2.130.0070.01114.98
7.2.120.0070.00714.88
7.2.110.0000.01315.10
7.2.100.0070.00715.08
7.2.90.0090.00615.14
7.2.80.0100.00314.93
7.2.70.0290.01015.00
7.2.60.0070.01115.05
7.2.50.0100.00715.20
7.2.40.0050.01015.14
7.2.30.0090.00615.01
7.2.20.0070.00715.12
7.2.10.0090.00615.20
7.2.00.0060.01215.20
7.1.330.0020.01115.15
7.1.320.0060.00715.17
7.1.310.0100.00315.24
7.1.300.0050.00915.13
7.1.290.0060.00615.22
7.1.280.0030.00915.23
7.1.270.0050.00815.17
7.1.260.0010.01115.30
7.1.250.0060.00913.89

preferences:
182.97 ms | 403 KiB | 5 Q