3v4l.org

run code in 300+ PHP versions simultaneously
<?php$input = 'coilovers[strut_and_individual_components][complete_strut][][achse]'); $output = array(); $pointer = $output;while( ($index = strpos( $input, '[')) !== false) { if( $index != 0) { $key = substr( $input, 0, $index); $pointer[$key] = array(); $pointer = $pointer[$key]; } $end_index = strpos( $input, ']'); $array_key = substr( $input, $index, $end_index); $pointer[$array_key] = array(); $pointer = $pointer[$array_key]; $input = substr( $input, $end_index); echo "$input\n";} <?php

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.60.0040.01116.63
8.3.50.0120.00722.78
8.3.40.0070.00718.75
8.3.30.0080.00818.97
8.3.20.0050.00320.26
8.3.10.0040.00421.73
8.3.00.0080.00017.50
8.2.180.0140.00316.63
8.2.170.0100.00722.96
8.2.160.0100.01020.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0080.00021.04
8.2.110.0210.00020.47
8.2.100.0040.00817.79
8.2.90.0040.00418.09
8.2.80.0000.00917.97
8.2.70.0060.00317.50
8.2.60.0050.00317.55
8.2.50.0040.00418.07
8.2.40.0000.00718.16
8.2.30.0030.00717.83
8.2.20.0040.00417.54
8.2.10.0030.00617.96
8.2.00.0040.00417.52
8.1.280.0070.01025.92
8.1.270.0060.00323.99
8.1.260.0030.00526.35
8.1.250.0050.00228.09
8.1.240.0040.00422.20
8.1.230.0080.00420.93
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0030.00617.00
8.1.190.0040.00417.10
8.1.180.0000.00718.10
8.1.170.0040.00418.50
8.1.160.0070.00021.93
8.1.150.0040.00418.64
8.1.140.0000.00817.18
8.1.130.0060.00017.79
8.1.120.0040.00417.37
8.1.110.0040.00417.30
8.1.100.0030.00317.33
8.1.90.0000.00817.27
8.1.80.0000.00717.27
8.1.70.0070.00017.29
8.1.60.0040.00417.46
8.1.50.0070.00017.37
8.1.40.0080.00017.27
8.1.30.0040.00417.50
8.1.20.0000.00717.48
8.1.10.0050.00217.28
8.1.00.0000.00717.38
8.0.300.0080.00019.95
8.0.290.0070.00016.63
8.0.280.0000.00718.27
8.0.270.0000.00817.11
8.0.260.0000.00617.23
8.0.250.0070.00016.86
8.0.240.0030.00316.70
8.0.230.0000.00816.78
8.0.220.0070.00016.76
8.0.210.0060.00316.71
8.0.200.0060.00316.77
8.0.190.0040.00416.79
8.0.180.0050.00216.85
8.0.170.0000.00816.64
8.0.160.0000.00716.68
8.0.150.0030.00316.68
8.0.140.0030.00316.60
8.0.130.0060.00013.38
8.0.120.0040.00416.81
8.0.110.0030.00316.79
8.0.100.0050.00216.60
8.0.90.0000.00716.62
8.0.80.0090.00716.71
8.0.70.0040.00416.79
8.0.60.0000.00716.79
8.0.50.0040.00416.61
8.0.30.0100.01116.91
8.0.20.0100.01217.40
8.0.10.0000.00716.81
8.0.00.0130.00416.47
7.4.330.0000.00615.03
7.4.320.0030.00316.33
7.4.300.0060.00016.31
7.4.290.0030.00316.46
7.4.280.0030.00616.43
7.4.270.0030.00316.43
7.4.260.0070.00016.41
7.4.250.0000.00716.39
7.4.240.0050.00216.41
7.4.230.0030.00316.27
7.4.220.0150.00316.39
7.4.210.0070.00616.35
7.4.200.0040.00416.25
7.4.160.0120.00316.25
7.4.150.0080.00817.40
7.4.140.0130.00617.86
7.4.130.0100.00716.45
7.4.120.0100.00716.33
7.4.110.0060.01016.41
7.4.100.0100.00716.43
7.4.90.0150.00616.27
7.4.80.0120.00419.39
7.4.70.0040.01116.30
7.4.60.0090.00916.51
7.4.50.0030.00616.32
7.4.40.0140.00316.11
7.4.30.0100.01016.34
7.3.330.0000.00612.98
7.3.320.0020.00213.20
7.3.310.0030.00316.07
7.3.300.0030.00316.11
7.3.290.0130.00716.16
7.3.280.0080.00916.14
7.3.270.0160.00817.40
7.3.260.0130.00716.20
7.3.250.0080.00816.21
7.3.240.0070.01016.30
7.3.230.0070.01016.39
7.3.210.0100.00716.21
7.3.200.0040.01819.39
7.3.190.0130.00316.30
7.3.180.0160.00416.16
7.3.170.0060.00916.27
7.3.160.0030.01316.14
7.2.330.0130.01016.57
7.2.320.0080.00816.59
7.2.310.0070.00816.27
7.2.300.0110.00616.47
7.2.290.0130.00916.51
5.5.150.0030.07720.10
5.5.140.0030.08320.17
5.5.130.0000.04320.18
5.5.120.0100.06020.20
5.5.110.0070.08020.14
5.5.100.0070.03720.01
5.5.90.0030.04720.00
5.5.80.0070.07720.09
5.5.70.0070.07320.05
5.5.60.0000.08019.99
5.5.50.0100.08020.05
5.5.40.0070.07020.14
5.5.30.0030.08020.14
5.5.20.0070.04320.12
5.5.10.0070.06320.00
5.5.00.0070.07720.00
5.4.310.0130.07719.16
5.4.300.0070.07718.91
5.4.290.0170.06719.12
5.4.280.0130.06719.02
5.4.270.0130.03719.16
5.4.260.0070.07719.04
5.4.250.0030.05718.94
5.4.240.0070.06019.03
5.4.230.0100.07319.02
5.4.220.0070.04019.15
5.4.210.0030.05718.94
5.4.200.0100.07019.20
5.4.190.0070.07719.19
5.4.180.0100.07319.15
5.4.170.0070.05319.08
5.4.160.0100.04019.00
5.4.150.0070.08019.10
5.4.140.0070.04716.34
5.4.130.0100.06716.25
5.4.120.0030.06716.32
5.4.110.0130.06716.39
5.4.100.0030.06316.39
5.4.90.0130.03716.36
5.4.80.0030.04316.34
5.4.70.0070.07016.48
5.4.60.0030.07316.48
5.4.50.0030.07716.29
5.4.40.0030.07716.52
5.4.30.0100.06016.30
5.4.20.0030.04316.47
5.4.10.0030.06716.47
5.4.00.0000.06315.87
5.3.290.0000.07014.49
5.3.280.0030.04014.58
5.3.270.0070.09014.62
5.3.260.0000.05314.43
5.3.250.0030.06714.45
5.3.240.0100.05714.42
5.3.230.0100.07014.53
5.3.220.0100.04314.52
5.3.210.0100.04314.56
5.3.200.0100.05014.55
5.3.190.0130.06714.54
5.3.180.0070.03714.50
5.3.170.0170.06314.55
5.3.160.0000.05014.52
5.3.150.0030.07714.52
5.3.140.0170.05714.53
5.3.130.0030.07714.41
5.3.120.0130.07014.53
5.3.110.0100.04714.54
5.3.100.0070.05714.00
5.3.90.0070.06713.86
5.3.80.0100.03313.96
5.3.70.0000.08014.00
5.3.60.0200.04013.97
5.3.50.0130.07013.93
5.3.40.0070.07713.71
5.3.30.0100.07013.76
5.3.20.0100.06713.68
5.3.10.0030.07013.42
5.3.00.0070.06713.54
5.2.170.0100.05011.59
5.2.160.0070.04711.59
5.2.150.0100.05711.59
5.2.140.0030.06311.59
5.2.130.0130.05011.59
5.2.120.0030.04011.59
5.2.110.0000.06311.59
5.2.100.0030.06311.59
5.2.90.0100.04711.59
5.2.80.0030.05711.59
5.2.70.0070.04011.59
5.2.60.0030.05311.59
5.2.50.0070.03011.59
5.2.40.0070.05311.59
5.2.30.0030.05311.59
5.2.20.0030.05711.59
5.2.10.0030.06011.59
5.2.00.0070.03011.59
5.1.60.0000.06011.59
5.1.50.0130.02311.59
5.1.40.0000.03011.59
5.1.30.0000.06011.59
5.1.20.0100.05011.59
5.1.10.0100.05011.59
5.1.00.0030.05711.59
5.0.50.0030.02311.59
5.0.40.0030.04311.59
5.0.30.0000.05311.59
5.0.20.0000.04711.59
5.0.10.0030.04711.59
5.0.00.0000.06011.59
4.4.90.0070.02711.59
4.4.80.0000.02011.59
4.4.70.0000.02711.59
4.4.60.0030.01711.59
4.4.50.0070.02711.59
4.4.40.0030.03311.59
4.4.30.0000.03711.59
4.4.20.0000.03011.59
4.4.10.0000.02011.59
4.4.00.0030.05011.59
4.3.110.0030.03311.59
4.3.100.0070.01311.59
4.3.90.0000.03311.59
4.3.80.0000.05711.59
4.3.70.0030.01711.59
4.3.60.0000.03311.59
4.3.50.0000.02711.59
4.3.40.0030.04711.59
4.3.30.0000.03711.59
4.3.20.0000.03711.59
4.3.10.0000.03711.59
4.3.00.0000.03311.59

preferences:
42.47 ms | 401 KiB | 5 Q