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($badPort, &$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.40.0170.00318.79
8.3.30.0080.00619.00
8.3.20.0040.00420.16
8.3.10.0000.00822.13
8.3.00.0080.00022.58
8.2.170.0060.00922.96
8.2.160.0100.00721.01
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0050.00319.48
8.2.110.0090.00022.27
8.2.100.0090.00317.91
8.2.90.0000.00819.24
8.2.80.0030.00617.97
8.2.70.0030.00619.41
8.2.60.0000.00817.93
8.2.50.0000.00918.10
8.2.40.0040.00420.45
8.2.30.0040.00418.08
8.2.20.0000.00717.80
8.2.10.0030.00517.81
8.2.00.0080.00017.84
8.1.270.0050.00323.82
8.1.260.0060.00326.35
8.1.250.0070.01028.09
8.1.240.0090.00019.34
8.1.230.0120.00017.83
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00317.38
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0080.00018.72
8.1.160.0030.00322.14
8.1.150.0040.00418.53
8.1.140.0000.00917.55
8.1.130.0030.00317.81
8.1.120.0040.00417.52
8.1.110.0020.00517.50
8.1.100.0040.00417.39
8.1.90.0030.00517.51
8.1.80.0050.00317.35
8.1.70.0030.00317.54
8.1.60.0000.00817.67
8.1.50.0040.00417.54
8.1.40.0000.00717.45
8.1.30.0060.00317.66
8.1.20.0040.00417.67
8.1.10.0030.00617.59
8.1.00.0060.00317.51
8.0.300.0060.00318.77
8.0.290.0090.00016.88
8.0.280.0040.00418.46
8.0.270.0030.00316.82
8.0.260.0050.00316.91
8.0.250.0000.00717.09
8.0.240.0030.00317.06
8.0.230.0070.00016.96
8.0.220.0000.00717.04
8.0.210.0000.00716.97
8.0.200.0070.00016.92
8.0.190.0000.00717.05
8.0.180.0040.00417.04
8.0.170.0030.00617.00
8.0.160.0000.00816.94
8.0.150.0050.00316.97
8.0.140.0030.00616.99
8.0.130.0000.00613.37
8.0.120.0040.00416.98
8.0.110.0040.00417.05
8.0.100.0030.00516.80
8.0.90.0040.00416.88
8.0.80.0130.00317.01
8.0.70.0000.00816.98
8.0.60.0000.00816.81
8.0.50.0040.00416.88
8.0.30.0110.01417.19
8.0.20.0090.00917.40
8.0.10.0040.00416.89
8.0.00.0110.00817.07
7.4.330.0000.00515.14
7.4.320.0000.00716.63
7.4.300.0000.00616.61
7.4.290.0000.00716.63
7.4.280.0030.00716.66
7.4.270.0070.00016.55
7.4.260.0030.00316.53
7.4.250.0040.00416.51
7.4.240.0020.00616.54
7.4.230.0000.00716.36
7.4.220.0070.01316.71
7.4.210.0090.01016.46
7.4.200.0050.00316.53
7.4.190.0080.00016.49
7.4.160.0070.01416.78
7.4.150.0190.00017.40
7.4.140.0060.01117.86
7.4.130.0020.02116.47
7.4.120.0110.01016.73
7.4.110.0080.01216.47
7.4.100.0080.01016.53
7.4.90.0090.01616.54
7.4.80.0150.00319.39
7.4.70.0030.01316.46
7.4.60.0130.00316.50
7.4.50.0040.00016.59
7.4.40.0120.00322.77
7.4.30.0090.00916.64
7.4.10.0030.01614.93
7.4.00.0070.00914.83
7.3.330.0020.00213.40
7.3.320.0030.00313.39
7.3.310.0050.00216.43
7.3.300.0030.00316.30
7.3.290.0040.01116.45
7.3.280.0140.00616.32
7.3.270.0090.00917.40
7.3.260.0120.00616.45
7.3.250.0100.00716.51
7.3.240.0100.00716.48
7.3.230.0100.00616.39
7.3.210.0090.01016.55
7.3.200.0130.01019.39
7.3.190.0140.00816.69
7.3.180.0110.00516.48
7.3.170.0120.00316.37
7.3.160.0110.01116.44
7.3.130.0160.00314.92
7.3.120.0060.01214.91
7.3.110.0100.00814.88
7.3.100.0040.01114.75
7.3.90.0060.01014.74
7.3.80.0080.00614.79
7.3.70.0060.00814.84
7.3.60.0060.00914.75
7.3.50.0080.00514.70
7.3.40.0060.00814.87
7.3.30.0060.00814.90
7.3.20.0040.00816.76
7.3.10.0050.00616.67
7.3.00.0050.01116.83
7.2.330.0040.01416.61
7.2.320.0120.01016.49
7.2.310.0120.00616.54
7.2.300.0070.01716.87
7.2.290.0070.01016.86
7.2.260.0090.01214.86
7.2.250.0060.01015.09
7.2.240.0070.01015.29
7.2.230.0020.01415.02
7.2.220.0050.01015.02
7.2.210.0060.01015.11
7.2.200.0030.01114.95
7.2.190.0070.00814.93
7.2.180.0080.00715.10
7.2.170.0100.00515.05
7.2.160.0090.00315.01
7.2.150.0040.00817.09
7.2.140.0100.00616.95
7.2.130.0070.01116.60
7.2.120.0030.01216.77
7.2.110.0060.00717.01
7.2.100.0030.00917.14
7.2.90.0030.01316.84
7.2.80.0090.00617.01
7.2.70.0120.00317.22
7.2.60.0100.00616.93
7.2.50.0150.00016.76
7.2.40.0030.00917.11
7.2.30.0000.01316.89
7.2.20.0030.01317.07
7.2.10.0090.00916.97
7.2.00.0120.00316.96
7.1.330.0070.00615.83
7.1.320.0050.00715.85
7.1.310.0080.00415.82
7.1.300.0050.01215.87
7.1.290.0050.00915.79
7.1.280.0070.00615.53
7.1.270.0060.00815.69
7.1.260.0070.01015.94
7.1.250.0090.00915.91
7.1.240.0060.01015.63
7.1.230.0080.00415.98
7.1.220.0030.01015.86
7.1.210.0090.00015.86
7.1.200.0070.00515.68
7.1.190.0040.00415.87
7.1.180.0040.01115.73
7.1.170.0030.00615.86
7.1.160.0030.00615.54
7.1.150.0030.01215.98
7.1.140.0070.00715.86
7.1.130.0060.01215.71
7.1.120.0070.00315.80
7.1.110.0000.00815.93
7.1.100.0040.00815.88
7.1.90.0060.00315.90
7.1.80.0030.00915.84
7.1.70.0020.01116.42
7.1.60.0100.00817.85
7.1.50.0060.01116.35
7.1.40.0090.00415.93
7.1.30.0000.01115.68
7.1.20.0090.00615.71
7.1.10.0060.00615.85
7.1.00.0050.04219.19
7.0.330.0040.01115.24
7.0.320.0040.00715.41
7.0.310.0000.01015.36
7.0.300.0030.00615.43
7.0.290.0050.00515.36
7.0.280.0060.01015.52
7.0.270.0000.00915.46
7.0.260.0000.01415.63
7.0.250.0060.00615.45
7.0.240.0000.01015.52
7.0.230.0040.01115.44
7.0.220.0080.00415.23
7.0.210.0000.01815.34
7.0.200.0040.00616.11
7.0.190.0130.00015.54
7.0.180.0050.00515.19
7.0.170.0060.01015.56
7.0.160.0050.00315.48
7.0.150.0040.00415.27
7.0.140.0010.04318.64
7.0.130.0090.00315.29
7.0.120.0070.00715.18
7.0.110.0090.00615.58
7.0.100.0070.00715.53
7.0.90.0030.00615.16
7.0.80.0140.03817.74
7.0.70.0030.05117.74
7.0.60.0350.04417.77
7.0.50.0270.05117.70
7.0.40.0080.03816.88
7.0.30.0110.04016.64
7.0.20.0070.04416.81
7.0.10.0080.04316.64
7.0.00.0090.04516.84
5.6.400.0120.00314.54
5.6.390.0000.01314.67
5.6.380.0090.00314.39
5.6.370.0000.01214.12
5.6.360.0030.00714.46
5.6.350.0070.00714.37
5.6.340.0140.00514.48
5.6.330.0000.01414.92
5.6.320.0100.00314.64
5.6.310.0120.00314.25
5.6.300.0040.00814.27
5.6.290.0100.00614.43
5.6.280.0080.03817.74
5.6.270.0060.00314.50
5.6.260.0040.00814.59
5.6.250.0030.01014.74
5.6.240.0040.00814.38
5.6.230.0080.03017.49
5.6.220.0140.03917.52
5.6.210.0020.03417.51
5.6.200.0090.04117.68
5.6.190.0100.03517.70
5.6.180.0030.04617.63
5.6.170.0030.04217.76
5.6.160.0070.04217.79
5.6.150.0130.03117.83
5.6.140.0020.04917.76
5.6.130.0130.03817.84
5.6.120.0090.04017.87
5.6.110.0060.02917.89
5.6.100.0080.04517.73
5.6.90.0120.03417.63
5.6.80.0070.04517.41
5.6.70.0080.04117.26
5.6.60.0080.04017.34
5.6.50.0080.03517.34
5.6.40.0050.02517.30
5.6.30.0070.04017.37
5.6.20.0100.04017.31
5.6.10.0030.03017.42
5.6.00.0080.03917.31
5.5.380.0070.00714.52
5.5.370.0100.04017.51
5.5.360.0050.04517.51
5.5.350.0050.04917.29
5.5.340.0090.04117.84
5.5.330.0080.04017.60
5.5.320.0100.03817.62
5.5.310.0070.02817.74
5.5.300.0080.04417.71
5.5.290.0030.05117.77
5.5.280.0110.03817.60
5.5.270.0070.03217.63
5.5.260.0110.04017.56
5.5.250.0100.04417.36
5.5.240.0070.03817.40
5.5.230.0050.03317.24
5.5.220.0070.02517.09
5.5.210.0090.02217.30
5.5.200.0070.02517.20
5.5.190.0060.02517.13
5.5.180.0050.03717.06
5.5.170.0040.00814.05
5.5.160.0090.04317.28
5.5.150.0120.02017.18
5.5.140.0030.03317.23
5.5.130.0100.04217.27
5.5.120.0020.02917.27
5.5.110.0080.02617.12
5.5.100.0050.04217.28
5.5.90.0030.03817.10
5.5.80.0050.02517.19
5.5.70.0120.03717.16
5.5.60.0030.04517.28
5.5.50.0020.03817.09
5.5.40.0050.04117.30
5.5.30.0140.02317.24
5.5.20.0170.03017.31
5.5.10.0100.03917.31
5.5.00.0080.02517.14
5.4.450.0080.04515.47
5.4.440.0120.02615.31
5.4.430.0050.03515.27
5.4.420.0070.04215.22
5.4.410.0050.04215.25
5.4.400.0030.02515.15
5.4.390.0060.04115.00
5.4.380.0030.02815.24
5.4.370.0060.03115.14
5.4.360.0100.03715.16
5.4.350.0050.03615.17
5.4.340.0050.03515.17
5.4.330.0000.01111.26
5.4.320.0100.03715.01
5.4.310.0070.04015.12
5.4.300.0110.03515.08
5.4.290.0050.02815.12
5.4.280.0060.03014.99
5.4.270.0100.03715.13
5.4.260.0040.04215.14
5.4.250.0070.03715.12
5.4.240.0020.02715.24
5.4.230.0020.02815.05
5.4.220.0050.04515.15
5.4.210.0050.02714.99
5.4.200.0080.03315.04
5.4.190.0080.03815.18
5.4.180.0070.03815.12
5.4.170.0070.03315.08
5.4.160.0090.02215.27
5.4.150.0120.03715.09
5.4.140.0070.03613.75
5.4.130.0020.04313.94
5.4.120.0030.04013.76
5.4.110.0020.02413.91
5.4.100.0070.04013.78
5.4.90.0030.03013.79
5.4.80.0030.03113.73
5.4.70.0050.03013.89
5.4.60.0060.03613.74
5.4.50.0100.02313.87
5.4.40.0030.03413.79
5.4.30.0080.02513.69
5.4.20.0110.01513.69
5.4.10.0070.03713.78
5.4.00.0060.03813.48
5.3.290.0130.03712.91
5.3.280.0050.04612.90
5.3.270.0050.04012.86
5.3.260.0130.03512.85
5.3.250.0120.03512.86
5.3.240.0070.03712.86
5.3.230.0030.02512.89
5.3.220.0120.03312.86
5.3.210.0050.04012.80
5.3.200.0050.02512.81
5.3.190.0070.04012.79
5.3.180.0070.03512.84
5.3.170.0040.04512.80
5.3.160.0050.03112.83
5.3.150.0070.03412.90
5.3.140.0020.03812.84
5.3.130.0030.02512.82
5.3.120.0030.02212.82
5.3.110.0040.03512.79
5.3.100.0040.02612.61
5.3.90.0050.03912.57
5.3.80.0070.03112.56
5.3.70.0060.03612.52
5.3.60.0030.02412.49
5.3.50.0030.03612.58
5.3.40.0050.03712.52
5.3.30.0090.03712.53
5.3.20.0080.02212.40
5.3.10.0030.04012.38
5.3.00.0080.03112.35
5.2.170.0030.03011.93
5.2.160.0030.05311.93
5.2.150.0030.06711.93
5.2.140.0030.06011.93
5.2.130.0070.06011.93
5.2.120.0130.03711.93
5.2.110.0000.06311.93
5.2.100.0030.03711.93
5.2.90.0070.06011.93
5.2.80.0030.05311.93
5.2.70.0030.04711.93
5.2.60.0070.04711.93
5.2.50.0070.03011.93
5.2.40.0070.05711.93
5.2.30.0030.06011.93
5.2.20.0030.05011.93
5.2.10.0100.04711.93
5.2.00.0100.02711.93
5.1.60.0030.04011.93
5.1.50.0030.05311.93
5.1.40.0070.02011.93
5.1.30.0000.04711.93
5.1.20.0030.04711.93
5.1.10.0130.04011.93
5.1.00.0070.02311.93
5.0.50.0000.03711.93
5.0.40.0030.02011.93
5.0.30.0030.03011.93
5.0.20.0070.04311.93
5.0.10.0000.02011.93
5.0.00.0030.06011.93
4.4.90.0030.02711.93
4.4.80.0000.01711.93
4.4.70.0000.03011.93
4.4.60.0070.03011.93
4.4.50.0030.03311.93
4.4.40.0030.05711.93
4.4.30.0030.01311.93
4.4.20.0030.03311.93
4.4.10.0030.02011.93
4.4.00.0000.03011.93
4.3.110.0000.01711.93
4.3.100.0000.02011.93
4.3.90.0030.01711.93
4.3.80.0000.03711.93
4.3.70.0070.03011.93
4.3.60.0030.02711.93
4.3.50.0030.03311.93
4.3.40.0000.03311.93
4.3.30.0000.01711.93
4.3.20.0070.03011.93
4.3.10.0070.03011.93
4.3.00.0000.01711.93

preferences:
45.87 ms | 400 KiB | 5 Q