3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ValueException extends Exception { /* You should have something like this already */ } function buildColumnFilter($colnum, $value) { return function($row) use ($colnum, $value) { return isset($row[$colnum]) && $row[$colnum] === $value; }; } function findColNumByName($table, $name) { if (!in_array($name, $table[0])) { throw new ValueException($name); } return array_search($name, $table[0]); } $triggers = array( array('description', 'triggerid'), array('Issue here', 2), array('Issue 3 here', 3), array('Issue 4 here', 4), ); $events = array( array('hostname', 'objectid'), array('john', 2), array('mike', 3), array('mike', 4), ); var_dump(array_filter($triggers, buildColumnFilter(findColNumByName($triggers, 'triggerid'), 2))); var_dump(array_filter($events, buildColumnFilter(findColNumByName($events, 'objectid'), 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.3.60.0120.00618.18
8.3.50.0120.01021.14
8.3.40.0120.00318.48
8.3.30.0150.00018.67
8.3.20.0050.00318.73
8.3.10.0000.00721.95
8.3.00.0040.00420.83
8.2.180.0070.00716.50
8.2.170.0070.00722.96
8.2.160.0110.00419.11
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0060.00319.76
8.2.110.0100.00020.33
8.2.100.0090.00317.72
8.2.90.0030.00617.75
8.2.80.0030.00518.78
8.2.70.0030.00617.75
8.2.60.0050.00317.38
8.2.50.0050.00318.10
8.2.40.0040.00420.45
8.2.30.0000.00720.71
8.2.20.0040.00417.82
8.2.10.0030.00518.21
8.2.00.0020.00518.02
8.1.280.0120.00325.92
8.1.270.0030.00724.02
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00323.77
8.1.230.0110.00022.11
8.1.220.0000.00818.52
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0000.00917.35
8.1.180.0110.00018.10
8.1.170.0060.00318.48
8.1.160.0070.00020.92
8.1.150.0000.00818.93
8.1.140.0050.00319.59
8.1.130.0030.00317.74
8.1.120.0030.00617.52
8.1.110.0040.00417.49
8.1.100.0070.00017.40
8.1.90.0080.00017.46
8.1.80.0070.00017.49
8.1.70.0030.00317.41
8.1.60.0000.00817.62
8.1.50.0000.00817.57
8.1.40.0030.00617.54
8.1.30.0000.00817.70
8.1.20.0000.00817.73
8.1.10.0000.00817.52
8.1.00.0030.00517.57
8.0.300.0050.00318.77
8.0.290.0070.00016.88
8.0.280.0070.00018.39
8.0.270.0030.00317.29
8.0.260.0080.00018.48
8.0.250.0070.00016.90
8.0.240.0030.00316.98
8.0.230.0030.00317.03
8.0.220.0000.00717.01
8.0.210.0040.00416.83
8.0.200.0030.00316.87
8.0.190.0040.00417.00
8.0.180.0040.00416.87
8.0.170.0030.00516.93
8.0.160.0030.00517.00
8.0.150.0080.00016.82
8.0.140.0030.00616.91
8.0.130.0060.00013.28
8.0.120.0040.00416.85
8.0.110.0000.00716.82
8.0.100.0000.00816.99
8.0.90.0050.00316.97
8.0.80.0110.00716.89
8.0.70.0040.00417.04
8.0.60.0000.00716.92
8.0.50.0030.00316.77
8.0.30.0130.00617.21
8.0.20.0120.00917.40
8.0.10.0040.00417.00
8.0.00.0130.00916.92
7.4.330.0050.00015.08
7.4.320.0040.00416.56
7.4.300.0030.00316.48
7.4.290.0030.00316.49
7.4.280.0000.00816.58
7.4.270.0030.00316.49
7.4.260.0040.00416.45
7.4.250.0040.00416.51
7.4.240.0030.00316.55
7.4.230.0050.00216.66
7.4.220.0070.02016.61
7.4.210.0070.01416.45
7.4.200.0050.00216.66
7.4.160.0080.00816.50
7.4.150.0110.00817.40
7.4.140.0110.00817.86
7.4.130.0060.01316.53
7.4.120.0050.01216.54
7.4.110.0110.00816.64
7.4.100.0180.00016.56
7.4.90.0090.01016.55
7.4.80.0100.00619.39
7.4.70.0130.01016.45
7.4.60.0140.00316.58
7.4.50.0130.00316.61
7.4.40.0160.00916.40
7.4.30.0100.00616.51
7.4.00.0070.00914.94
7.3.330.0000.00613.18
7.3.320.0030.00313.33
7.3.310.0000.00716.30
7.3.300.0070.00016.42
7.3.290.0110.00816.39
7.3.280.0100.00816.44
7.3.270.0110.00617.40
7.3.260.0140.00416.73
7.3.250.0110.00716.58
7.3.240.0070.01016.58
7.3.230.0060.00916.39
7.3.210.0210.00016.48
7.3.200.0160.00316.42
7.3.190.0030.01316.57
7.3.180.0070.01016.41
7.3.170.0090.00916.44
7.3.160.0060.00916.43
7.3.120.0070.00814.82
7.3.110.0050.01115.02
7.3.100.0050.01014.97
7.3.90.0020.00914.98
7.3.80.0080.00714.82
7.3.70.0020.01214.77
7.3.60.0040.00814.93
7.3.50.0050.00914.70
7.3.40.0100.00514.84
7.3.30.0100.00614.66
7.3.20.0030.01016.58
7.3.10.0060.00716.59
7.3.00.0030.00916.47
7.2.330.0080.01216.77
7.2.320.0070.01016.91
7.2.310.0080.00816.43
7.2.300.0060.01216.63
7.2.290.0070.01116.76
7.2.250.0100.01015.03
7.2.240.0060.01015.13
7.2.230.0080.00815.07
7.2.220.0040.00815.08
7.2.210.0060.00714.98
7.2.200.0050.00714.98
7.2.190.0060.00414.98
7.2.180.0070.00814.97
7.2.170.0020.00914.86
7.2.160.0050.01015.13
7.2.150.0070.01016.82
7.2.140.0050.00817.02
7.2.130.0070.00516.91
7.2.120.0040.01217.04
7.2.110.0080.00816.92
7.2.100.0090.00816.92
7.2.90.0050.01217.07
7.2.80.0030.01217.14
7.2.70.0070.00616.77
7.2.60.0070.00916.97
7.2.50.0120.00517.03
7.2.40.0000.01116.89
7.2.30.0070.00817.12
7.2.20.0020.01016.86
7.2.10.0030.01016.90
7.2.00.0090.00617.63
7.1.330.0080.00815.78
7.1.320.0050.00815.91
7.1.310.0060.00615.82
7.1.300.0070.00515.63
7.1.290.0050.00915.72
7.1.280.0030.00715.80
7.1.270.0070.00715.82
7.1.260.0110.00115.76
7.1.250.0000.01115.66
7.1.240.0060.01015.48
7.1.230.0030.01415.44
7.1.220.0080.00815.41
7.1.210.0110.00415.80
7.1.200.0030.00915.71
7.1.190.0110.00715.64
7.1.180.0070.00715.69
7.1.170.0070.00715.85
7.1.160.0080.00415.66
7.1.150.0000.01415.77
7.1.140.0040.00715.66
7.1.130.0030.00915.57
7.1.120.0070.01015.91
7.1.110.0060.00915.43
7.1.100.0050.00717.12
7.1.90.0070.00715.86
7.1.80.0100.00715.57
7.1.70.0020.00716.38
7.1.60.0070.00918.09
7.1.50.0000.01515.98
7.1.40.0040.01115.80
7.1.30.0060.00315.80
7.1.20.0080.00615.78
7.1.10.0080.00615.92
7.1.00.0030.04319.10
7.0.330.0000.00815.11
7.0.320.0060.00615.47
7.0.310.0000.01315.45
7.0.300.0110.00015.10
7.0.290.0070.00715.43
7.0.280.0040.01115.31
7.0.270.0000.01315.34
7.0.260.0100.00315.39
7.0.250.0030.01015.17
7.0.240.0070.00715.36
7.0.230.0030.01115.35
7.0.220.0090.00315.25
7.0.210.0060.00615.18
7.0.200.0140.00715.10
7.0.190.0110.00415.36
7.0.180.0060.00315.35
7.0.170.0030.00615.14
7.0.160.0100.00315.16
7.0.150.0150.00015.32
7.0.140.0030.00615.50
7.0.130.0030.01015.55
7.0.120.0040.01115.49
7.0.110.0030.01015.46
7.0.100.0090.00615.45
7.0.90.0120.00315.39
7.0.80.0070.00715.27
7.0.70.0030.01015.23
7.0.60.0080.04318.49
7.0.50.0070.04216.64
7.0.40.0180.02816.64
7.0.30.0120.03216.63
7.0.20.0100.03316.78
7.0.10.0120.04916.81
7.0.00.0080.03616.86
5.6.400.0070.00714.48
5.6.390.0000.01514.45
5.6.380.0080.00414.11
5.6.370.0070.01114.42
5.6.360.0050.00514.76
5.6.350.0060.00914.46
5.6.340.0060.00714.26
5.6.330.0000.01014.62
5.6.320.0090.00313.95
5.6.310.0000.01514.47
5.6.300.0070.00414.51
5.6.290.0060.00614.07
5.6.280.0060.03817.63
5.6.270.0070.01014.25
5.6.260.0070.00314.00
5.6.250.0080.00414.48
5.6.240.0070.00414.36
5.6.230.0040.01214.25
5.6.220.0070.01114.16
5.6.210.0080.02617.47
5.6.200.0070.04416.26
5.6.190.0070.04017.56
5.6.180.0130.03517.45
5.6.170.0150.03117.44
5.6.160.0100.03317.37
5.6.150.0200.02517.19
5.6.140.0080.03717.25
5.6.130.0120.03517.50
5.6.120.0080.03517.28
5.6.110.0090.03617.32
5.6.100.0120.02917.20
5.6.90.0090.03617.14
5.6.80.0270.03016.93
5.6.70.0180.03317.01
5.6.60.0200.03217.00
5.6.50.0220.03116.86
5.6.40.0310.03717.01
5.6.30.0150.03616.95
5.6.20.0200.03317.00
5.6.10.0150.04117.14
5.6.00.0170.03516.92
5.5.380.0070.00714.43
5.5.370.0070.00714.26
5.5.360.0100.00714.08
5.5.350.0130.03817.38
5.5.340.0140.02716.07
5.5.330.0120.03317.17
5.5.320.0180.02617.24
5.5.310.0130.03217.50
5.5.300.0100.03617.28
5.5.290.0120.04417.18
5.5.280.0110.03217.04
5.5.270.0100.03117.23
5.5.260.0080.03317.22
5.5.250.0030.03717.06
5.5.240.0180.03916.79
5.5.230.0250.03616.85
5.5.220.0250.04316.84
5.5.210.0220.03616.94
5.5.200.0250.04216.73
5.5.190.0170.03916.70
5.5.180.0240.02716.82
5.5.170.0000.01414.29
5.5.160.0170.03316.97
5.5.150.0220.02916.82
5.5.140.0220.03416.75
5.5.130.0250.03316.90
5.5.120.0200.03616.73
5.5.110.0280.02816.88
5.5.100.0220.03016.87
5.5.90.0230.02816.77
5.5.80.0280.03316.92
5.5.70.0180.04016.87
5.5.60.0220.04416.70
5.5.50.0200.02916.72
5.5.40.0160.02816.88
5.5.30.0110.02916.52
5.5.20.0080.04216.56
5.5.10.0200.03016.85
5.5.00.0170.03416.74

preferences:
37.31 ms | 401 KiB | 5 Q