3v4l.org

run code in 300+ PHP versions simultaneously
<?php $features = [ 'feature1' =>[ 'XYZ' => 'dfa2394bcf754a19b9e72d14207ad7d0', 'XZY' => '582a5b9654564055a2e56a0f9a7a399e', 'YZX' => '582a5b9654564055a2e56a0f9a7a399e' ], 'feature2' =>[ 'XYZ' => 'ert2394bcf754a19b9e72d14207ad7d0', 'XZY' => 'op2a5b9654564055a2e56a0f9a7a399e', 'YZX' => '1sd5b9654564055a2e56a0f9a7a399e' ] ]; foreach ($XML->article as $article) { foreach ($article->datagroup1->feature as $key => $feature) { // introduce $key if(isset($features[$feature['key']])){ $featureName = (string)$feature->en; if(isset($features[$feature['key']][$featureName])){ $articleData['properties'][$key]['id'] = $features[$feature['key']][$featureName]; // use $key } } } }

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.0080.01016.89
8.5.00.0150.00620.24
8.4.150.0030.00014.05
8.4.140.0130.01017.66
8.4.130.0050.00518.46
8.4.120.0140.00717.81
8.4.110.0120.00919.54
8.4.100.0150.00617.93
8.4.90.0110.00820.70
8.4.80.0070.00217.83
8.4.70.0060.00417.58
8.4.60.0130.00317.79
8.4.50.0080.00818.62
8.4.40.0070.01419.70
8.4.30.0130.00620.18
8.4.20.0030.01618.89
8.4.10.0060.00319.71
8.3.280.0140.01018.36
8.3.270.0140.00616.91
8.3.260.0090.01116.54
8.3.250.0100.01016.68
8.3.240.0120.00816.90
8.3.230.0090.01016.44
8.3.220.0130.00618.73
8.3.210.0090.01016.75
8.3.200.0100.01216.79
8.3.190.0060.00219.08
8.3.180.0040.00418.44
8.3.170.0040.00418.71
8.3.160.0180.00020.39
8.3.150.0120.00618.38
8.3.140.0050.00317.07
8.3.130.0000.00818.77
8.3.120.0100.00618.88
8.3.110.0080.00320.94
8.3.100.0070.01124.06
8.3.90.0040.00426.77
8.3.80.0030.00618.56
8.3.70.0070.00718.55
8.3.60.0120.00916.50
8.3.50.0140.00718.29
8.3.40.0130.00718.63
8.3.30.0120.00318.48
8.3.20.0030.00524.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0110.00617.04
8.2.280.0050.00620.34
8.2.270.0070.01117.16
8.2.260.0090.00616.67
8.2.250.0040.00417.17
8.2.240.0060.00317.06
8.2.230.0000.00822.58
8.2.220.0040.00437.54
8.2.210.0110.00326.77
8.2.200.0040.00418.41
8.2.190.0070.00716.88
8.2.180.0130.01018.54
8.2.170.0070.01418.99
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00420.97
8.2.110.0060.00322.05
8.2.100.0080.00417.91
8.2.90.0080.00017.88
8.2.80.0040.00418.77
8.2.70.0000.00817.93
8.2.60.0070.00018.09
8.2.50.0040.00418.10
8.2.40.0030.00521.04
8.2.30.0070.00019.29
8.2.20.0040.00417.93
8.2.10.0020.00520.94
8.2.00.0050.00319.21
8.1.330.0130.00616.39
8.1.320.0090.00916.32
8.1.310.0100.00718.43
8.1.300.0140.00318.14
8.1.290.0080.00030.84
8.1.280.0090.00625.92
8.1.270.0060.00320.73
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00522.01
8.1.230.0000.01117.77
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0030.00518.88
8.1.150.0050.00318.93
8.1.140.0070.00018.95
8.1.130.0000.00820.06
8.1.120.0000.00717.45
8.1.110.0060.00317.38
8.1.100.0040.00417.30
8.1.90.0090.00017.52
8.1.80.0040.00417.38
8.1.70.0040.00417.46
8.1.60.0030.00617.51
8.1.50.0000.00817.54
8.1.40.0050.00317.54
8.1.30.0050.00517.59
8.1.20.0050.00317.69
8.1.10.0040.00417.35
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0050.00316.75
8.0.280.0070.00018.37
8.0.270.0090.00016.88
8.0.260.0000.00718.49
8.0.250.0030.00317.08
8.0.240.0030.00517.01
8.0.230.0000.00716.98
8.0.220.0020.00516.96
8.0.210.0040.00416.95
8.0.200.0040.00417.01
8.0.190.0000.00817.03
8.0.180.0000.00716.86
8.0.170.0060.00316.90
8.0.160.0000.00716.90
8.0.150.0000.00716.88
8.0.140.0000.00716.80
8.0.130.0000.00513.45
8.0.120.0000.00816.89
8.0.110.0000.00716.85
8.0.100.0040.00416.99
8.0.90.0000.00816.99
8.0.80.0080.00816.95
8.0.70.0000.00816.80
8.0.60.0030.00516.81
8.0.50.0070.00016.89
8.0.30.0130.00616.85
8.0.20.0140.00317.00
8.0.10.0080.01217.05
8.0.00.0060.01117.05
7.4.330.0020.00215.55
7.4.320.0060.00016.63
7.4.300.0040.00416.39
7.4.290.0000.00716.51
7.4.280.0040.00416.51
7.4.270.0030.00316.40
7.4.260.0060.00013.17
7.4.250.0000.00716.48
7.4.240.0060.00216.62
7.4.230.0030.00316.43
7.4.220.0060.00116.47
7.4.210.0100.00816.54
7.4.200.0070.00016.69
7.4.160.0140.00716.69
7.4.150.0130.00316.61
7.4.140.0060.00916.33
7.4.130.0140.00516.48
7.4.120.0040.01116.56
7.4.110.0100.01016.37
7.4.100.0090.00616.55
7.4.90.0090.00616.42
7.4.80.0120.00916.38
7.4.70.0040.01116.45
7.4.60.0090.00816.52
7.4.50.0060.00916.32
7.4.40.0140.00516.16
7.4.30.0100.01016.36
7.4.20.0140.00016.29
7.4.10.0090.00616.55
7.4.00.0030.01316.45
7.3.330.0000.00716.32
7.3.320.0030.00313.08
7.3.310.0030.00516.14
7.3.300.0060.00016.21
7.3.290.0110.00316.14
7.3.270.0100.01016.20
7.3.260.0080.00816.26
7.3.250.0150.00316.17
7.3.240.0130.00616.21
7.3.230.0040.01616.14
7.3.220.0060.00916.16
7.3.210.0100.00716.11
7.3.200.0090.00616.12
7.3.190.0030.01216.08
7.3.180.0100.01016.20
7.3.170.0040.01216.16
7.3.160.0060.01316.13
7.3.150.0040.01116.11
7.3.140.0040.01416.17
7.3.130.0120.00616.16
7.3.120.0000.01516.14
7.3.110.0070.01116.02
7.3.100.0120.00616.07
7.3.90.0100.00916.38
7.3.80.0100.01016.25
7.3.70.0100.01016.20
7.3.60.0090.00616.24
7.3.50.0030.01216.30
7.3.40.0100.01016.22
7.3.30.0130.00316.25
7.3.20.0120.00816.36
7.3.10.0060.00916.30
7.3.00.0120.00316.30

preferences:
42.61 ms | 403 KiB | 5 Q