3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "objectId | 19 location.street | Rue des clochets translations.fr.idTranslation | 4"; $output = []; $lines = explode("\n", $input); foreach ($lines as $line) { $cols = explode("|", $line); $key = trim($cols[0]); $value = trim($cols[1]); $indices = explode('.', $key); $first = array_shift($indices); if (!isset($output[$first])) $output[$first] = []; $target = &$output[$first]; foreach ($indices as $index) { if (!isset($target[$index])) { $target[$index] = []; $target = &$target[$index]; } } $target = $value; } var_dump($output);

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.4.140.0140.00817.66
8.4.130.0120.00917.91
8.4.120.0090.01223.92
8.4.110.0060.00321.56
8.4.100.0050.00418.10
8.4.90.0100.01018.66
8.4.80.0070.00317.89
8.4.70.0140.00617.71
8.4.60.0090.01420.56
8.4.50.0050.00417.73
8.4.40.0130.00724.11
8.4.30.0060.00919.12
8.4.20.0040.00417.88
8.4.10.0070.01019.72
8.3.270.0120.00716.59
8.3.260.0120.00717.03
8.3.250.0130.00518.97
8.3.240.0130.00716.96
8.3.230.0100.00816.57
8.3.220.0120.00618.96
8.3.210.0100.00516.54
8.3.200.0060.00316.55
8.3.190.0080.01118.90
8.3.180.0110.00718.29
8.3.170.0100.00916.71
8.3.160.0060.01217.37
8.3.150.0030.01618.95
8.3.140.0000.00816.60
8.3.130.0080.00016.74
8.3.120.0030.00520.82
8.3.110.0030.00616.79
8.3.100.0080.01116.75
8.3.90.0070.01116.48
8.3.80.0060.00318.30
8.3.70.0070.00716.58
8.3.60.0060.00916.75
8.3.50.0110.00516.48
8.3.40.0110.00418.76
8.3.30.0090.00618.83
8.3.20.0000.00920.34
8.3.10.0040.00421.94
8.3.00.0040.00417.46
8.2.290.0120.00620.40
8.2.280.0030.00918.13
8.2.270.0120.00320.40
8.2.260.0000.00816.47
8.2.250.0100.00718.27
8.2.240.0110.00017.21
8.2.230.0030.00620.94
8.2.220.0040.00424.06
8.2.210.0040.01426.77
8.2.200.0040.00416.38
8.2.190.0040.01116.58
8.2.180.0090.00625.92
8.2.170.0110.00422.96
8.2.160.0080.00620.39
8.2.150.0070.00024.18
8.2.140.0000.00724.66
8.2.130.0040.00419.26
8.2.120.0070.00026.35
8.2.110.0060.00322.08
8.2.100.0080.00417.84
8.2.90.0030.00519.22
8.2.80.0090.00017.97
8.2.70.0030.00517.50
8.2.60.0050.00318.03
8.2.50.0050.00518.10
8.2.40.0040.00420.59
8.2.30.0000.00820.97
8.2.20.0040.00418.24
8.2.10.0070.00018.04
8.2.00.0070.00018.18
8.1.330.0120.00822.24
8.1.320.0100.01016.37
8.1.310.0060.01216.84
8.1.300.0090.00016.70
8.1.290.0090.00030.84
8.1.280.0100.01025.92
8.1.270.0050.00222.02
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00322.68
8.1.230.0110.00017.89
8.1.220.0090.00017.74
8.1.210.0000.00918.77
8.1.200.0100.00017.35
8.1.190.0000.00817.25
8.1.180.0080.00018.10
8.1.170.0030.00618.84
8.1.160.0050.00218.98
8.1.150.0040.00420.71
8.1.140.0020.00519.49
8.1.130.0040.00418.81
8.1.120.0000.00717.48
8.1.110.0040.00417.27
8.1.100.0050.00217.50
8.1.90.0050.00317.44
8.1.80.0050.00317.34
8.1.70.0040.00417.36
8.1.60.0040.00417.43
8.1.50.0040.00417.45
8.1.40.0030.00517.48
8.1.30.0050.00317.68
8.1.20.0000.00817.65
8.1.10.0040.00417.59
8.1.00.0020.00517.53
8.0.300.0040.00418.77
8.0.290.0050.00316.63
8.0.280.0030.00318.37
8.0.270.0070.00017.27
8.0.260.0030.00316.77
8.0.250.0030.00316.80
8.0.240.0050.00316.86
8.0.230.0040.00416.99
8.0.220.0030.00316.89
8.0.210.0030.00516.88
8.0.200.0040.00416.87
8.0.190.0030.00616.89
8.0.180.0050.00216.90
8.0.170.0000.00816.86
8.0.160.0080.00516.88
8.0.150.0030.00316.82
8.0.140.0040.00416.75
8.0.130.0060.00013.34
8.0.120.0050.00216.79
8.0.110.0000.00816.79
8.0.100.0000.00817.02
8.0.90.0000.00716.89
8.0.80.0000.01516.95
8.0.70.0030.00517.02
8.0.60.0050.00216.90
8.0.50.0040.00416.80
8.0.30.0080.01117.16
8.0.20.0160.00817.40
8.0.10.0020.00516.89
8.0.00.0090.00916.65
7.4.330.0000.00615.55
7.4.320.0060.00016.41
7.4.300.0060.00016.61
7.4.290.0000.00716.60
7.4.280.0000.00716.60
7.4.270.0000.00716.62
7.4.260.0000.00716.50
7.4.250.0070.00016.54
7.4.240.0030.00316.62
7.4.230.0070.00016.55
7.4.220.0150.00316.61
7.4.210.0090.00616.52
7.4.200.0030.00316.59
7.4.160.0100.00716.54
7.4.150.0090.00917.40
7.4.140.0080.00917.86
7.4.130.0100.01316.68
7.4.120.0080.01116.55
7.4.110.0130.01016.34
7.4.100.0120.00616.56
7.4.90.0090.00916.33
7.4.80.0130.00319.39
7.4.70.0070.01016.43
7.4.60.0100.00616.42
7.4.50.0030.01316.54
7.4.40.0080.00816.63
7.4.30.0110.00516.74
7.4.10.0130.00616.31
7.4.00.0070.00715.63
7.3.330.0050.00013.17
7.3.320.0000.00513.26
7.3.310.0030.00316.10
7.3.300.0000.00716.36
7.3.290.0080.00516.30
7.3.280.0100.00516.32
7.3.270.0120.00617.40
7.3.260.0080.01316.42
7.3.250.0060.01516.51
7.3.240.0090.01116.55
7.3.230.0100.00716.57
7.3.210.0000.01616.35
7.3.200.0050.01116.38
7.3.190.0100.00716.36
7.3.180.0040.01216.59
7.3.170.0150.00316.38
7.3.160.0180.00016.33
7.3.130.0070.01116.28
7.3.120.0110.00816.19
7.3.110.0070.00716.16
7.3.100.0100.00016.48
7.3.90.0040.01116.36
7.3.80.0130.00316.28
7.3.70.0060.00916.25
7.3.60.0060.00616.41
7.3.50.0000.01016.32
7.3.40.0090.00916.35
7.3.30.0050.00516.28
7.3.20.0060.00618.07
7.3.10.0080.00818.14
7.3.00.0070.00418.05
7.2.330.0120.00416.34
7.2.320.0130.01016.71
7.2.310.0100.01016.35
7.2.300.0100.01016.57
7.2.290.0130.00316.71
7.2.260.0130.00616.84
7.2.250.0070.01416.55
7.2.240.0090.00916.38
7.2.230.0040.01116.23
7.2.220.0070.00316.75
7.2.210.0070.00316.78
7.2.200.0070.01016.44
7.2.190.0030.00916.47
7.2.180.0040.01116.43
7.2.170.0060.00616.52
7.2.160.0090.00916.49
7.2.150.0110.00318.31
7.2.140.0070.00718.52
7.2.130.0160.00318.32
7.2.120.0060.00618.34
7.2.110.0120.00418.36
7.2.100.0110.00418.25
7.2.90.0060.01618.37
7.2.80.0070.01018.46
7.2.70.0100.00718.26
7.2.60.0070.00917.67
7.2.50.0070.01018.50
7.2.40.0040.01118.36
7.2.30.0030.01518.24
7.2.20.0070.00718.48
7.2.10.0030.01218.52
7.2.00.0090.00518.96
7.1.330.0080.00417.31
7.1.320.0040.00817.46
7.1.310.0000.01117.35
7.1.300.0110.00317.30
7.1.290.0100.00317.28
7.1.280.0030.01217.47
7.1.270.0030.01017.29
7.1.260.0030.01017.30
7.1.250.0070.00717.44
7.1.240.0030.00717.40
7.1.230.0090.00317.27
7.1.220.0050.00817.26
7.1.210.0100.00717.36
7.1.200.0050.01116.61
7.1.190.0000.01517.30
7.1.180.0070.00317.30
7.1.170.0030.00917.19
7.1.160.0070.00717.42
7.1.150.0040.00817.30
7.1.140.0090.00917.38
7.1.130.0120.00317.11
7.1.120.0070.01017.48
7.1.110.0040.00717.45
7.1.100.0070.00717.67
7.1.90.0090.00317.26
7.1.80.0070.00317.47
7.1.70.0120.00417.29
7.1.60.0180.01026.24
7.1.50.0160.01125.92
7.1.40.0090.01425.80
7.1.30.0190.01125.86
7.1.20.0150.01425.99
7.1.10.0050.01217.09
7.1.00.0080.01017.01
7.0.330.0070.00717.00
7.0.320.0040.00417.02
7.0.310.0100.00017.02
7.0.300.0060.00916.99
7.0.290.0140.00016.83
7.0.280.0040.00716.98
7.0.270.0060.00616.79
7.0.260.0120.00316.94
7.0.250.0040.01116.84
7.0.240.0090.00317.11
7.0.230.0030.00916.91
7.0.220.0030.00916.89
7.0.210.0030.00916.89
7.0.200.0030.01216.84
7.0.190.0070.00917.04
7.0.180.0060.00716.69
7.0.170.0090.00816.55
7.0.160.0050.01416.71
7.0.150.0110.00716.69
7.0.140.0070.00916.59
7.0.130.0150.00316.68
7.0.120.0060.00916.79
7.0.110.0090.00716.67
7.0.100.0080.01016.54
7.0.90.0050.01016.61
7.0.80.0060.00816.65
7.0.70.0050.00816.65
7.0.60.0080.00816.61
7.0.50.0080.00516.64
7.0.40.0070.00915.68
7.0.30.0070.00915.79
7.0.20.0060.00815.47
7.0.10.0100.00515.62
7.0.00.0030.01315.65
5.6.400.0070.01016.21
5.6.390.0070.00715.73
5.6.380.0040.00816.15
5.6.370.0030.01016.02
5.6.360.0040.01216.02
5.6.350.0070.00715.61
5.6.340.0040.01115.91
5.6.330.0060.00816.17
5.6.320.0030.01415.98
5.6.310.0030.00916.09
5.6.300.0030.00915.91
5.6.290.0060.00915.76
5.6.280.0090.00616.23
5.6.270.0100.00715.89
5.6.260.0080.00515.91
5.6.250.0060.01015.75
5.6.240.0070.00715.86
5.6.230.0080.00415.96
5.6.220.0000.01315.89
5.6.210.0100.00715.89
5.6.200.0150.00415.74
5.6.190.0080.00615.64
5.6.180.0040.00715.68
5.6.170.0080.00816.00
5.6.160.0060.00615.87
5.6.150.0060.00915.69
5.6.140.0060.00615.73
5.6.130.0060.00615.86
5.6.120.0060.01215.77
5.6.110.0090.00615.82
5.6.100.0000.01016.00
5.6.90.0070.00315.82
5.6.80.0080.00515.86
5.6.70.0090.00615.98
5.6.60.0110.00315.73
5.6.50.0040.01115.80
5.6.40.0040.01115.60
5.6.30.0040.00816.12
5.6.20.0040.00815.70
5.6.10.0060.00915.71
5.6.00.0000.01015.56

preferences:
36.25 ms | 403 KiB | 5 Q