3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '123.animal=cat 123.name=fred 123.food=fish 345.animal=dog petshop=zoonoria'; $ini = parse_ini_string($data); $result = []; foreach ($ini as $key => $value) { echo $key, ' => ', $value, PHP_EOL; $splitKey = explode('.', $key); $iniPtr = &$result; foreach($splitKey as $subKey) { if (!isset($iniPtr[$subKey])) { $iniPtr[$subKey] = null; } $iniPtr = &$iniPtr[$subKey]; } $iniPtr = $value; unset($iniPtr); } var_dump($result);

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.00.0120.01119.88
8.4.150.0020.00014.05
8.4.140.0140.00717.46
8.4.130.0120.00818.61
8.4.120.0140.00720.64
8.4.110.0040.00518.97
8.4.100.0130.00817.57
8.4.90.0140.00720.80
8.4.80.0130.00618.85
8.4.70.0080.01017.68
8.4.60.0130.00820.57
8.4.50.0060.00718.75
8.4.40.0060.00318.51
8.4.30.0100.01017.59
8.4.20.0100.01017.49
8.4.10.0100.01017.52
8.3.280.0140.00718.33
8.3.270.0090.01016.70
8.3.260.0120.00716.63
8.3.250.0120.00816.63
8.3.240.0050.00316.57
8.3.230.0110.00916.63
8.3.220.0110.00718.86
8.3.210.0070.00818.37
8.3.200.0060.00516.67
8.3.190.0140.00419.00
8.3.180.0090.01016.42
8.3.170.0090.00917.22
8.3.160.0150.00320.32
8.3.150.0030.01516.38
8.3.140.0000.00917.33
8.3.130.0060.00318.52
8.3.120.0030.00918.86
8.3.110.0100.00620.94
8.3.100.0030.00716.50
8.3.90.0040.01518.56
8.3.80.0060.00318.43
8.3.70.0210.00016.38
8.3.60.0140.00316.38
8.3.50.0120.00721.99
8.3.40.0090.00918.92
8.3.30.0110.00418.84
8.3.20.0070.00020.24
8.3.10.0050.00323.65
8.3.00.0050.00319.91
8.2.290.0100.00917.19
8.2.280.0110.00818.54
8.2.270.0090.00917.48
8.2.260.0090.00616.68
8.2.250.0040.00418.85
8.2.240.0120.00316.92
8.2.230.0040.00422.58
8.2.220.0130.00724.06
8.2.210.0040.00426.77
8.2.200.0040.00418.41
8.2.190.0100.00616.58
8.2.180.0120.00918.41
8.2.170.0120.00622.96
8.2.160.0070.00719.12
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0090.00020.39
8.2.120.0050.00326.35
8.2.110.0030.00622.23
8.2.100.0060.00617.91
8.2.90.0080.00018.03
8.2.80.0030.00517.97
8.2.70.0050.00317.63
8.2.60.0030.00617.38
8.2.50.0000.00918.07
8.2.40.0000.01119.22
8.2.30.0050.00220.50
8.2.20.0060.00317.85
8.2.10.0030.00618.03
8.2.00.0000.00718.23
8.1.330.0120.00716.19
8.1.320.0120.00816.11
8.1.310.0140.00018.33
8.1.300.0060.01217.71
8.1.290.0000.01018.88
8.1.280.0090.00625.92
8.1.270.0060.01323.84
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0090.00022.59
8.1.230.0030.00920.97
8.1.220.0000.00817.74
8.1.210.0040.00418.95
8.1.200.0040.00417.48
8.1.190.0040.00417.52
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0000.00720.78
8.1.150.0000.00718.91
8.1.140.0050.00319.61
8.1.130.0040.00417.58
8.1.120.0040.00417.48
8.1.110.0070.00017.48
8.1.100.0030.00317.45
8.1.90.0020.00517.52
8.1.80.0040.00417.44
8.1.70.0030.00317.43
8.1.60.0000.00717.54
8.1.50.0040.00417.58
8.1.40.0040.00417.42
8.1.30.0000.00817.63
8.1.20.0030.00617.57
8.1.10.0040.00417.51
8.1.00.0080.00017.50
8.0.300.0000.00820.03
8.0.290.0060.00316.63
8.0.280.0000.00718.49
8.0.270.0000.00817.25
8.0.260.0040.00417.27
8.0.250.0030.00316.89
8.0.240.0040.00416.85
8.0.230.0030.00316.91
8.0.220.0000.00716.90
8.0.210.0000.00716.88
8.0.200.0000.00616.87
8.0.190.0000.00716.91
8.0.180.0040.00416.97
8.0.170.0050.00316.88
8.0.160.0050.00316.83
8.0.150.0060.00316.88
8.0.140.0000.00716.85
8.0.130.0020.00513.38
8.0.120.0000.00816.89
8.0.110.0030.00516.85
8.0.100.0000.00716.80
8.0.90.0040.00416.96
8.0.80.0090.01016.88
8.0.70.0080.00016.82
8.0.60.0030.00516.82
8.0.50.0040.00416.74
8.0.30.0080.00817.13
8.0.20.0100.00917.40
8.0.10.0000.00816.91
8.0.00.0110.00816.87
7.4.330.0030.00316.79
7.4.320.0030.00316.61
7.4.300.0030.00316.49
7.4.290.0030.00316.59
7.4.280.0050.00216.58
7.4.270.0030.00316.61
7.4.260.0070.00316.61
7.4.250.0050.00316.45
7.4.240.0050.00216.60
7.4.230.0030.00316.59
7.4.220.0220.00316.67
7.4.210.0090.00616.46
7.4.200.0000.00716.50
7.4.160.0100.00716.42
7.4.150.0130.00717.40
7.4.140.0100.01017.86
7.4.130.0140.00716.51
7.4.120.0140.00716.50
7.4.110.0140.00916.49
7.4.100.0130.00416.54
7.4.90.0120.01316.38
7.4.80.0120.00619.39
7.4.70.0070.01016.63
7.4.60.0100.00716.55
7.4.50.0130.00016.66
7.4.40.0090.00716.54
7.4.30.0180.00416.52
7.4.00.0130.00315.09
7.3.330.0080.00013.17
7.3.320.0000.00613.07
7.3.310.0030.00316.29
7.3.300.0040.00416.34
7.3.290.0110.00716.33
7.3.280.0100.00616.36
7.3.270.0040.01417.40
7.3.260.0100.00716.60
7.3.250.0110.00516.52
7.3.240.0100.01116.31
7.3.230.0070.01116.42
7.3.210.0110.00716.29
7.3.200.0070.01416.19
7.3.190.0180.00616.65
7.3.180.0070.00916.56
7.3.170.0050.01316.38
7.3.160.0090.01216.44
7.2.330.0030.01316.58
7.2.320.0060.01216.63
7.2.310.0190.00316.59
7.2.300.0000.02016.71
7.2.290.0090.00916.44
7.2.00.0180.00719.39
7.1.200.0040.00415.63
7.1.100.0030.01018.17
7.1.70.0050.00316.95
7.1.60.0040.02219.50
7.1.50.0160.00717.01
7.1.00.0030.07722.30
7.0.200.0040.00416.88
7.0.60.0070.04019.82
7.0.50.0000.04717.88
7.0.40.0070.05020.24
7.0.30.0270.07720.13
7.0.20.0330.06720.13
7.0.10.0100.05320.00
7.0.00.0030.09320.17
5.6.280.0030.05021.09
5.6.210.0070.08020.55
5.6.200.0000.05318.18
5.6.190.0070.04320.56
5.6.180.0400.04720.45
5.6.170.0230.06720.50
5.6.160.0100.08020.48
5.6.150.0030.04018.09
5.6.140.0070.08318.10
5.6.130.0070.05718.17
5.6.120.0030.04021.11
5.6.110.0130.07021.01
5.6.100.0070.06321.08
5.6.90.0000.04320.98
5.6.80.0030.08720.37
5.5.350.0130.07720.30
5.5.340.0070.08317.91
5.5.330.0100.04020.29
5.5.320.0070.07720.31
5.5.310.0170.03720.18
5.5.300.0070.03717.96
5.5.290.0100.06718.03
5.5.280.0030.04020.64
5.5.270.0200.07320.96
5.5.260.0070.05020.76
5.5.250.0130.04720.68
5.5.240.0230.07020.23

preferences:
30.66 ms | 403 KiB | 5 Q