3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ [ "tag" => "DOCUMENT", "type" => "open", "level" => 1 ], [ "tag" => "SENDERID", "type" => "open", "level" => 1, "value" => "TEST" ], [ "tag" => "SENDERSHORTNAME", "type" => "open", "level" => 1 ], [ "tag" => "RECIPIENTID", "type" => "open", "level" => 1, "value" => "VGLEE" ] ]; $compare_array = array('DOCUMENT', 'SENDERID', 'SENDERSHORTNAME', 'RECIPIENTID'); $result = array_reduce($arrays, function($carry, $item) use ($compare_array) { if(isset($item["value"]) && in_array($item["tag"], $compare_array, true)) { $carry[$item["tag"]] = $item["value"]; } return $carry; }); extract($result, EXTR_OVERWRITE); echo $SENDERID; echo PHP_EOL; echo $RECIPIENTID;

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.130.0040.00818.59
8.3.120.0130.00320.68
8.3.110.0130.00320.94
8.3.100.0130.00624.06
8.3.90.0140.00416.75
8.3.80.0040.00418.18
8.3.70.0110.00418.43
8.3.60.0070.00718.43
8.3.50.0100.00617.13
8.3.40.0070.00718.96
8.3.30.0090.00618.72
8.3.20.0040.00419.28
8.3.10.0040.00419.46
8.3.00.0080.00023.70
8.2.250.0080.00816.67
8.2.240.0090.00018.79
8.2.230.0080.00322.58
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0030.00616.63
8.2.190.0120.00316.58
8.2.180.0100.01316.35
8.2.170.0000.01518.89
8.2.160.0120.00322.96
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.46
8.2.110.0030.00719.24
8.2.100.0110.00017.84
8.2.90.0030.00519.05
8.2.80.0000.00817.97
8.2.70.0090.00618.12
8.2.60.0110.00418.28
8.2.50.0120.00218.35
8.2.40.0100.00418.42
8.2.30.0120.00118.38
8.2.20.0090.00418.34
8.2.10.0050.00818.33
8.2.00.0020.01119.01
8.1.300.0050.00318.34
8.1.290.0030.00618.88
8.1.280.0070.01125.92
8.1.270.0030.00621.91
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0070.00322.45
8.1.230.0080.00317.45
8.1.220.0000.00817.79
8.1.210.0050.00518.77
8.1.200.0090.00717.99
8.1.190.0090.00517.92
8.1.180.0060.00818.36
8.1.170.0130.00218.76
8.1.160.0070.00618.77
8.1.150.0100.00418.72
8.1.140.0080.00618.13
8.1.130.0100.00519.94
8.1.120.0090.00518.05
8.1.110.0090.00818.05
8.1.100.0050.00718.05
8.1.90.0100.00318.05
8.1.80.0040.00818.02
8.1.70.0040.00818.03
8.1.60.0060.01018.05
8.1.50.0040.01018.10
8.1.40.0070.00818.09
8.1.30.0100.00518.13
8.1.20.0050.00918.14
8.1.10.0070.00818.13
8.1.00.0070.00718.08
8.0.300.0000.00918.77
8.0.290.0050.00917.62
8.0.280.0070.00618.57
8.0.270.0060.00717.97
8.0.260.0090.00517.90
8.0.250.0080.00417.82
8.0.240.0060.00517.82
8.0.230.0070.00717.80
8.0.220.0060.00817.71
8.0.210.0060.00517.71
8.0.200.0080.00417.80
8.0.190.0090.00317.78
8.0.180.0080.00517.80
8.0.170.0110.00217.78
8.0.160.0070.00517.76
8.0.150.0060.00617.77
8.0.140.0080.00517.67
8.0.130.0080.00315.99
8.0.120.0100.00217.75
8.0.110.0070.00617.77
8.0.100.0070.00617.65
8.0.90.0070.00617.69
8.0.80.0100.00717.44
8.0.70.0060.00717.71
8.0.60.0060.00717.67
8.0.50.0110.00417.75
8.0.30.0090.00817.41
8.0.20.0110.00818.01
8.0.10.0110.00217.88
8.0.00.0100.00717.52
7.4.330.0070.00417.08
7.4.320.0070.00617.62
7.4.300.0070.00617.56
7.4.290.0100.00317.57
7.4.280.0130.00117.61
7.4.270.0090.00417.52
7.4.260.0090.00517.56
7.4.250.0090.00517.54
7.4.240.0050.00917.57
7.4.230.0070.00717.53
7.4.220.0040.00817.63
7.4.210.0060.00917.26
7.4.200.0050.00717.65
7.4.190.0110.00718.62
7.4.180.0150.00318.62
7.4.160.0100.00617.24
7.4.150.0090.00918.62
7.4.140.0110.00717.98
7.4.130.0160.00117.60
7.4.120.0100.00816.85
7.4.110.0090.01117.54
7.4.100.0170.00117.56
7.4.90.0150.00617.54
7.4.80.0130.00819.01
7.4.70.0110.00717.64
7.4.60.0120.00617.51
7.4.50.0100.00517.51
7.4.40.0110.00717.66
7.4.30.0150.00318.62
7.4.20.0180.00018.62
7.4.10.0150.00318.62
7.4.00.0090.00516.86
7.3.330.0080.00516.00
7.3.320.0110.00116.00
7.3.310.0110.00217.47
7.3.300.0070.00517.47
7.3.290.0100.00217.50
7.3.280.0150.00317.12
7.3.270.0150.00218.62
7.3.260.0120.00716.98
7.3.250.0150.00518.62
7.3.240.0100.00916.87
7.3.230.0080.01017.54
7.3.220.0150.00518.62
7.3.210.0140.00717.64
7.3.200.0110.01017.44
7.3.190.0150.00517.62
7.3.180.0120.00617.56
7.3.170.0110.00717.44
7.3.160.0080.00817.51
7.3.150.0160.00418.62
7.3.140.0140.00518.62
7.3.130.0160.00218.62
7.3.120.0150.00318.62
7.3.110.0170.00418.62
7.3.100.0190.00018.62
7.3.90.0110.00718.62
7.3.80.0180.00018.62
7.3.70.0090.00918.62
7.3.60.0120.00518.62
7.3.50.0150.00018.62
7.3.40.0050.01018.62
7.3.30.0150.00018.62
7.3.20.0150.00018.62
7.3.10.0160.00617.46
7.3.00.0100.00817.41
7.2.340.0120.00218.62
7.2.330.0090.01217.71
7.2.320.0080.00817.64
7.2.310.0090.00917.71
7.2.300.0110.00617.70
7.2.290.0110.00817.56
7.2.280.0150.00018.62
7.2.270.0100.00518.62
7.2.260.0100.00518.62
7.2.250.0130.00218.62
7.2.240.0110.00418.62
7.2.230.0070.00718.62
7.2.220.0100.00618.62
7.2.210.0140.00018.62
7.2.200.0100.00618.62
7.2.190.0150.00018.62
7.2.180.0080.00818.62
7.2.170.0080.00818.62
7.2.160.0080.00818.62
7.2.150.0160.00318.62
7.2.140.0080.00818.62
7.2.130.0100.00917.28
7.2.120.0100.00817.57
7.2.110.0130.00617.47
7.2.100.0100.01017.41
7.2.90.0130.00617.30
7.2.80.0110.00617.36
7.2.70.0100.01017.33
7.2.60.0440.00816.32
7.2.50.0340.00616.22
7.2.40.0490.00816.41
7.2.30.0420.00916.44
7.2.20.0370.01016.34
7.2.10.0480.00816.63
7.2.00.0340.00716.51
7.1.330.0160.00018.62
7.1.320.0070.00718.62
7.1.310.0100.00418.62
7.1.300.0070.00718.62
7.1.290.0120.00218.62
7.1.280.0120.00418.62
7.1.270.0100.00518.62
7.1.260.0160.00018.62
7.1.250.0100.00717.07
7.1.240.0120.00318.62
7.1.230.0110.00418.62
7.1.220.0170.00018.62
7.1.210.0150.00018.62
7.1.200.0110.00417.21
7.1.190.0120.00218.62
7.1.180.0110.00418.62
7.1.170.0720.00915.29
7.1.160.0460.00717.52
7.1.150.0540.00817.22
7.1.140.1100.01017.29
7.1.130.0460.00917.36
7.1.120.0440.00917.55
7.1.110.0440.00716.99
7.1.100.0540.00716.93
7.1.90.0410.00916.98
7.1.80.0130.00816.97
7.1.70.1750.00816.41
7.1.60.1840.00928.27
7.1.50.1790.01328.13
7.1.40.1150.01027.91
7.1.30.0630.00927.87
7.1.20.2360.00928.00
7.1.10.0640.00915.99
7.1.00.0380.00816.10
7.0.330.0140.00018.62
7.0.320.0130.00018.62
7.0.310.0080.00518.62
7.0.300.1000.00815.21
7.0.290.0700.00617.46
7.0.280.0050.00918.62
7.0.270.0650.01017.44
7.0.260.0640.00417.59
7.0.250.0570.00617.25
7.0.240.0490.00617.40
7.0.230.0100.01017.29
7.0.220.0570.00817.24
7.0.210.0140.00916.64
7.0.200.0640.00516.71
7.0.190.0600.01016.80
7.0.180.0380.00616.51
7.0.170.0760.00816.49
7.0.160.0130.00516.50
7.0.150.0500.01116.51
7.0.140.0650.00616.59
7.0.130.0610.00816.68
7.0.120.0600.00616.74
7.0.110.0570.00516.57
7.0.100.0780.00816.63
7.0.90.0630.00416.43
7.0.80.0890.00516.51
7.0.70.1000.00816.52
7.0.60.0670.00516.48
7.0.50.0590.00416.65
7.0.40.0590.00816.67
7.0.30.0690.00716.71
7.0.20.0280.00516.62
7.0.10.0400.00416.62
7.0.00.0810.00816.55
5.6.400.0050.00818.62
5.6.390.0100.00718.62
5.6.380.0070.00718.62
5.6.370.0090.00618.62
5.6.360.0160.00018.62
5.6.350.0110.00418.62
5.6.340.0120.00318.62
5.6.330.0090.00618.62
5.6.320.0150.00018.62
5.6.310.0140.00018.62
5.6.300.0150.03920.11
5.6.290.0080.03519.61
5.6.280.0140.03219.81
5.6.270.0140.03819.70
5.6.260.0140.02919.69
5.6.250.0160.03219.69
5.6.240.0100.03519.77
5.6.230.0120.03319.70
5.6.220.0130.03319.67
5.6.210.0170.02719.56
5.6.200.0150.04219.67
5.6.190.0100.03519.66
5.6.180.0120.03019.66
5.6.170.0150.03119.67
5.6.160.0160.03719.68
5.6.150.0140.03019.70
5.6.140.0120.03119.69
5.6.130.0140.03019.80
5.6.120.0110.04219.69
5.6.110.0140.04019.67
5.6.100.0170.03119.71
5.6.90.0130.03119.66
5.6.80.0130.03219.37
5.6.70.0200.03319.47
5.6.60.0140.03019.44
5.6.50.0120.02919.35
5.6.40.0100.03219.45
5.6.30.0150.03119.46
5.6.20.0130.03019.35
5.6.10.0160.03019.40
5.6.00.0130.02919.43

preferences:
28.57 ms | 403 KiB | 5 Q