3v4l.org

run code in 300+ PHP versions simultaneously
<?php $itinerary = array (array('portName'=>'Day At Sea'), array('portName'=>'Moscow'), array('portName'=>'Jupiter')); $badPorts = array('At Sea', 'Day At Sea', 'Cruising The Mediterranean Sea'); $image = ''; $arr = array(); array_walk($itinerary, function($item, $index) use($badPorts, &$arr){ if(!in_array($item['portName'], $badPorts)) $arr[] = $index.":".$item['portName']; }); $image .= implode(',', $arr); var_dump($image); $image2 = ''; $arr2 = array(); foreach($itinerary as $index => $item){ if(!in_array($item['portName'], $badPorts)) $arr2[] = $index.":".$item['portName']; } $image2 .= implode(',', $arr2); var_dump($image2); $index = 0; $image3 = implode(',', array_reduce($itinerary, function ($result, $item) use($badPorts, &$index) { if(!in_array($item['portName'], $badPorts)) $result[] = $index.":".$item['portName']; return $result; }, array())); var_dump($image3);

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.70.0070.01118.31
8.3.60.0150.00618.43
8.3.50.0090.01021.33
8.3.40.0110.00418.88
8.3.30.0110.00418.72
8.3.20.0040.00420.66
8.3.10.0060.00320.89
8.3.00.0000.00823.61
8.2.180.0150.00018.29
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0090.00026.16
8.2.120.0070.00021.10
8.2.110.0060.00320.52
8.2.100.0070.00417.78
8.2.90.0030.00519.30
8.2.80.0040.00419.40
8.2.70.0060.00317.63
8.2.60.0050.00318.05
8.2.50.0040.00818.07
8.2.40.0060.00718.24
8.2.30.0090.00019.47
8.2.20.0000.00717.74
8.2.10.0080.00017.83
8.2.00.0030.00517.77
8.1.280.0100.00725.92
8.1.270.0000.00724.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.01322.60
8.1.230.0210.00020.67
8.1.220.0000.00818.77
8.1.210.0060.00318.96
8.1.200.0060.00317.35
8.1.190.0060.00317.51
8.1.180.0080.00018.10
8.1.170.0060.00318.48
8.1.160.0040.00418.93
8.1.150.0040.00418.70
8.1.140.0000.00717.38
8.1.130.0030.00317.80
8.1.120.0000.00717.55
8.1.110.0050.00317.47
8.1.100.0040.00417.38
8.1.90.0020.00517.49
8.1.80.0030.00517.48
8.1.70.0000.00717.40
8.1.60.0060.00317.58
8.1.50.0070.00017.48
8.1.40.0030.00517.43
8.1.30.0060.00317.70
8.1.20.0000.00817.68
8.1.10.0040.00417.63
8.1.00.0050.00217.53
8.0.300.0080.00020.05
8.0.290.0040.00417.05
8.0.280.0030.00318.43
8.0.270.0040.00417.34
8.0.260.0000.00616.88
8.0.250.0070.00016.86
8.0.240.0080.00316.89
8.0.230.0000.00717.00
8.0.220.0080.00316.88
8.0.210.0050.00216.89
8.0.200.0000.00716.95
8.0.190.0060.00316.82
8.0.180.0040.00416.82
8.0.170.0000.00816.88
8.0.160.0000.00816.93
8.0.150.0040.00416.89
8.0.140.0030.00516.77
8.0.130.0030.00313.42
8.0.120.0040.00416.84
8.0.110.0000.00816.79
8.0.100.0000.00716.73
8.0.90.0040.00416.80
8.0.80.0110.00416.89
8.0.70.0000.00816.95
8.0.60.0070.00016.78
8.0.50.0000.00816.82
8.0.30.0140.01017.10
8.0.20.0100.01217.40
8.0.10.0050.00216.99
8.0.00.0080.01116.72
7.4.330.0020.00216.89
7.4.320.0100.00016.34
7.4.300.0000.00616.58
7.4.290.0000.00816.53
7.4.280.0000.00816.52
7.4.270.0000.00716.53
7.4.260.0030.00313.34
7.4.250.0040.00416.49
7.4.240.0030.00316.45
7.4.230.0000.00816.40
7.4.220.0090.01016.46
7.4.210.0080.00916.51
7.4.200.0030.00516.69
7.4.190.0070.00016.61
7.4.160.0080.00816.46
7.4.150.0120.00617.40
7.4.140.0160.00517.86
7.4.130.0100.00716.67
7.4.120.0110.01016.64
7.4.110.0030.01316.48
7.4.100.0080.01216.39
7.4.90.0060.01216.59
7.4.80.0170.00419.39
7.4.70.0090.00616.58
7.4.60.0070.01016.57
7.4.50.0040.00416.51
7.4.40.0040.01522.77
7.4.30.0150.00616.41
7.4.10.0030.01615.13
7.4.00.0050.01014.95
7.3.330.0030.00313.35
7.3.320.0060.00013.39
7.3.310.0000.00716.52
7.3.300.0000.00716.45
7.3.290.0030.01116.28
7.3.280.0070.00816.34
7.3.270.0080.01617.40
7.3.260.0090.01018.24
7.3.250.0080.01316.27
7.3.240.0100.00616.50
7.3.230.0110.00616.57
7.3.210.0140.00316.46
7.3.200.0130.00319.39
7.3.190.0040.01216.52
7.3.180.0060.01016.56
7.3.170.0080.00816.38
7.3.160.0200.00816.35
7.3.130.0100.01014.79
7.3.120.0050.01215.06
7.3.110.0040.01515.07
7.3.100.0030.01314.82
7.3.90.0040.00814.55
7.3.80.0090.00915.00
7.3.70.0000.01614.94
7.3.60.0070.01014.57
7.3.50.0160.00014.93
7.3.40.0090.00014.64
7.3.30.0120.00314.71
7.3.20.0030.00716.74
7.3.10.0030.00916.80
7.3.00.0030.01016.74
7.2.330.0070.01116.84
7.2.320.0040.01516.73
7.2.310.0070.01716.71
7.2.300.0070.01516.83
7.2.290.0150.00616.73
7.2.260.0070.01015.27
7.2.250.0070.01115.17
7.2.240.0030.01015.07
7.2.230.0070.01115.31
7.2.220.0070.01114.98
7.2.210.0090.00614.97
7.2.200.0070.00715.12
7.2.190.0100.00715.05
7.2.180.0120.00614.98
7.2.170.0100.00315.10
7.2.160.0070.00415.19
7.2.150.0000.01217.07
7.2.140.0060.00916.96
7.2.130.0120.00017.07
7.2.120.0120.00616.93
7.2.110.0030.01316.92
7.2.100.0070.00716.84
7.2.90.0080.00816.74
7.2.80.0070.00716.77
7.2.70.0060.00617.13
7.2.60.0080.00417.13
7.2.50.0040.01216.80
7.2.40.0070.00717.02
7.2.30.0070.00317.04
7.2.20.0000.01717.08
7.2.10.0030.01317.05
7.2.00.0040.00818.15
7.1.330.0030.01015.76
7.1.320.0080.00816.01
7.1.310.0100.00615.82
7.1.300.0090.00615.83
7.1.290.0040.01115.76
7.1.280.0100.00315.61
7.1.270.0070.00315.73
7.1.260.0090.00615.82
7.1.250.0040.00815.69
7.1.240.0090.00615.94
7.1.230.0000.01215.97
7.1.220.0060.00615.81
7.1.210.0030.01015.98
7.1.200.0120.00315.82
7.1.190.0030.00815.65
7.1.180.0000.01215.46
7.1.170.0070.00415.93
7.1.160.0040.00715.97
7.1.150.0100.00315.66
7.1.140.0040.00415.82
7.1.130.0070.00715.82
7.1.120.0090.00615.90
7.1.110.0000.01415.66
7.1.100.0030.00817.09
7.1.90.0060.00316.04
7.1.80.0060.00315.94
7.1.70.0050.00616.56
7.1.60.0050.00716.73
7.1.50.0040.01016.81
7.1.40.0070.01016.60
7.1.30.0060.00916.67
7.1.20.0030.01016.72
7.1.10.0090.00816.62
7.1.00.0150.00816.66
7.0.330.0000.01415.36
7.0.320.0060.00315.25
7.0.310.0040.00715.61
7.0.300.0000.00815.43
7.0.290.0090.00315.24
7.0.280.0000.00915.32
7.0.270.0090.00315.60
7.0.260.0000.01515.43
7.0.250.0030.00515.31
7.0.240.0000.01215.54
7.0.230.0030.01015.31
7.0.220.0000.00915.28
7.0.210.0060.00615.55
7.0.200.0030.01016.57
7.0.190.0030.00816.47
7.0.180.0050.00616.47
7.0.170.0060.00516.55
7.0.160.0030.00816.56
7.0.150.0090.00716.52
7.0.140.0130.01416.43
7.0.130.0090.00816.54
7.0.120.0100.00616.46
7.0.110.0100.01216.45
7.0.100.0140.00316.48
7.0.90.0100.01216.45
7.0.80.0110.00916.37
7.0.70.0100.01216.32
7.0.60.0110.01116.53
7.0.50.0130.00616.68
7.0.40.0050.00615.52
7.0.30.0040.01115.46
7.0.20.0030.00615.55
7.0.10.0030.01115.46
7.0.00.0040.00915.46
5.6.400.0030.00714.65
5.6.390.0070.01014.73
5.6.380.0040.01114.32
5.6.370.0060.00614.69
5.6.360.0060.00314.71
5.6.350.0050.00514.80
5.6.340.0060.00914.71
5.6.330.0060.00314.10
5.6.320.0030.00614.72
5.6.310.0060.00914.49
5.6.300.0080.02317.79
5.6.290.0070.04517.55
5.6.280.0080.02317.64
5.6.270.0090.03817.74
5.6.260.0110.03817.67
5.6.250.0050.04617.63
5.6.240.0110.03017.72
5.6.230.0030.02917.72
5.6.220.0100.04317.75
5.6.210.0080.02317.79
5.6.200.0090.02517.60
5.6.190.0060.02717.62
5.6.180.0090.02617.69
5.6.170.0070.02617.66
5.6.160.0030.03617.71
5.6.150.0080.03117.54
5.6.140.0140.02417.71
5.6.130.0080.03117.83
5.6.120.0050.04417.59
5.6.110.0020.05417.78
5.6.100.0240.03117.54
5.6.90.0020.02817.67
5.6.80.0130.03717.38
5.6.70.0100.01917.47
5.6.60.0140.01817.40
5.6.50.0070.02217.37
5.6.40.0080.03417.37
5.6.30.0060.02517.25
5.6.20.0030.02717.38
5.6.10.0040.02417.42
5.6.00.0070.02517.26
5.5.380.0020.03715.98
5.5.370.0090.04115.96
5.5.360.0090.04715.97
5.5.350.0140.03415.93
5.5.340.0090.03016.30
5.5.330.0100.03616.23
5.5.320.0030.03116.38
5.5.310.0110.02416.38
5.5.300.0060.02816.36
5.5.290.0080.02216.26
5.5.280.0050.04216.25
5.5.270.0050.03516.02
5.5.260.0150.03616.15
5.5.250.0010.02716.32
5.5.240.0030.04116.02
5.5.230.0060.03015.88
5.5.220.0100.03916.11
5.5.210.0100.02715.89
5.5.200.0050.02615.77
5.5.190.0030.02715.77
5.5.180.0080.03515.93
5.5.170.0060.00914.14
5.5.160.0030.02515.99
5.5.150.0100.03416.00
5.5.140.0060.02716.00
5.5.130.0050.02315.92
5.5.120.0050.02415.93
5.5.110.0080.02415.92
5.5.100.0070.02316.01
5.5.90.0070.02115.95
5.5.80.0050.02416.02
5.5.70.0080.02316.04
5.5.60.0050.02615.88
5.5.50.0060.02515.93
5.5.40.0030.02815.84
5.5.30.0050.02315.95
5.5.20.0070.02415.92
5.5.10.0070.02115.97
5.5.00.0120.02116.04
5.4.450.0050.03915.29
5.4.440.0040.02515.30
5.4.430.0090.02115.35
5.4.420.0050.02715.21
5.4.410.0080.02015.17
5.4.400.0050.04014.99
5.4.390.0060.03915.04
5.4.380.0030.04215.13
5.4.370.0030.03115.07
5.4.360.0100.02015.09
5.4.350.0100.02115.05
5.4.340.0000.03215.28
5.4.330.0040.00710.98
5.4.320.0050.03015.21
5.4.310.0050.04015.04
5.4.300.0060.02214.88
5.4.290.0060.01815.14
5.4.280.0070.02214.99
5.4.270.0110.01715.06
5.4.260.0020.02715.02
5.4.250.0010.02615.01
5.4.240.0030.03415.04
5.4.230.0030.03115.16
5.4.220.0000.02714.95
5.4.210.0070.02315.11
5.4.200.0050.02915.05
5.4.190.0000.02815.04
5.4.180.0110.02315.23
5.4.170.0070.02115.16
5.4.160.0110.01714.91
5.4.150.0040.02314.99
5.4.140.0070.02214.23
5.4.130.0010.02414.15
5.4.120.0020.02414.22
5.4.110.0060.02214.15
5.4.100.0120.01514.36
5.4.90.0080.02414.36
5.4.80.0020.02614.34
5.4.70.0020.02714.29
5.4.60.0050.02514.30
5.4.50.0060.02014.32
5.4.40.0040.02114.24
5.4.30.0050.02314.26
5.4.20.0100.02914.26
5.4.10.0060.02214.15
5.4.00.0110.01914.29
5.3.290.0020.02314.13
5.3.280.0050.02914.12
5.3.270.0030.02513.97
5.3.260.0010.02513.98
5.3.250.0020.02614.06
5.3.240.0040.02413.96
5.3.230.0050.02314.11
5.3.220.0030.02414.12
5.3.210.0000.02814.08
5.3.200.0000.02914.04
5.3.190.0030.02613.98
5.3.180.0030.02414.16
5.3.170.0050.02214.04
5.3.160.0040.02614.16
5.3.150.0060.02514.16
5.3.140.0060.01914.14
5.3.130.0070.02314.18
5.3.120.0030.02414.16
5.3.110.0110.02014.10
5.3.100.0070.01914.06
5.3.90.0050.02614.14
5.3.80.0050.02313.97
5.3.70.0080.02013.94
5.3.60.0040.02414.10
5.3.50.0050.02313.97
5.3.40.0030.02613.97
5.3.30.0050.02014.08
5.3.20.0080.02014.06
5.3.10.0000.02813.83
5.3.00.0070.02013.99
5.2.170.0310.02417.55
5.2.160.0110.02617.55
5.2.150.0060.03017.55
5.2.140.0000.03717.55
5.2.130.0000.04017.55
5.2.120.0130.02517.55
5.2.110.0000.03517.55
5.2.100.0030.03117.55
5.2.90.0100.02417.55
5.2.80.0040.02917.55
5.2.70.0070.03317.55
5.2.60.0100.02317.55
5.2.50.0000.03617.55
5.2.40.0090.02517.55
5.2.30.0090.03617.55
5.2.20.0000.03317.55
5.2.10.0030.03017.55
5.2.00.0070.02817.55
5.1.60.0030.02717.55
5.1.50.0080.02317.55
5.1.40.0070.02017.55
5.1.30.0030.02617.55
5.1.20.0000.03017.55
5.1.10.0070.02117.55
5.1.00.0000.03217.55
5.0.50.0060.01917.55
5.0.40.0030.01917.55
5.0.30.0000.04317.55
5.0.20.0000.02517.55
5.0.10.0060.01917.55
5.0.00.0060.03117.55
4.4.90.0040.01417.55
4.4.80.0040.01517.55
4.4.70.0040.01517.55
4.4.60.0000.01817.55
4.4.50.0000.02217.55
4.4.40.0030.02717.55
4.4.30.0060.01617.55
4.4.20.0030.01917.55
4.4.10.0000.01917.55
4.4.00.0110.03517.55
4.3.110.0060.01317.55
4.3.100.0100.01017.55
4.3.90.0000.02017.55
4.3.80.0060.01917.55
4.3.70.0000.01717.55
4.3.60.0040.01517.55
4.3.50.0040.01517.55
4.3.40.0000.02817.55
4.3.30.0000.02417.55
4.3.20.0000.02317.55
4.3.10.0000.02017.55
4.3.00.0030.01617.55

preferences:
43.16 ms | 401 KiB | 5 Q