3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attribute_options_string = "Spice (Very Hot/3, Hot/2, Medium/1) | Size(Small,Medium,Large)"; $attribute_options_array = array(); $attributes = preg_split('/\s*\|\s*/', $attribute_options_string); foreach ($attributes as $attribute) { preg_match('/\s*(\w+)\s*\(([^)]+)/', $attribute, $matches); $attribute_name = strtolower($matches[1]); $options = preg_split('/\s*,\s*/', $matches[2]); foreach ($options as $option) { if (strpos($option, '/') !== false) { list($option_name, $option_value) = preg_split('#\s*/\s*#', $option); $attribute_options_array[$attribute_name][strtolower($option_name)] = $option_value; } else { $attribute_options_array[$attribute_name][] = strtolower($option); } } } var_export($attribute_options_array);

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.120.0140.00720.38
8.4.110.0120.00822.52
8.4.100.0150.00618.04
8.4.90.0140.00718.73
8.4.80.0120.00919.79
8.4.70.0090.01017.75
8.4.60.0090.00720.66
8.4.50.0110.00919.65
8.4.40.0040.00419.70
8.4.30.0000.00920.42
8.4.20.0080.00020.34
8.4.10.0100.00719.69
8.3.250.0120.00719.12
8.3.240.0120.00816.77
8.3.230.0080.00916.78
8.3.220.0130.00617.32
8.3.210.0110.00716.76
8.3.200.0050.00316.76
8.3.190.0110.00817.07
8.3.180.0130.00719.16
8.3.170.0110.00717.45
8.3.160.0090.00818.66
8.3.150.0060.01317.27
8.3.140.0110.00417.25
8.3.130.0030.00618.67
8.3.120.0030.00618.89
8.3.110.0030.00620.94
8.3.100.0070.01016.89
8.3.90.0040.00426.77
8.3.80.0070.00416.60
8.3.70.0110.00718.56
8.3.60.0070.00718.68
8.3.50.0120.01017.58
8.3.40.0120.00418.79
8.3.30.0040.01118.98
8.3.20.0080.00021.69
8.3.10.0080.00018.98
8.3.00.0040.00421.95
8.2.290.0100.00920.54
8.2.280.0090.00918.54
8.2.270.0070.01116.71
8.2.260.0160.00316.64
8.2.250.0070.01116.82
8.2.240.0080.00016.96
8.2.230.0090.00622.58
8.2.220.0030.00624.06
8.2.210.0130.00726.77
8.2.200.0030.00616.75
8.2.190.0160.00616.58
8.2.180.0150.00325.92
8.2.170.0060.00922.96
8.2.160.0070.00720.18
8.2.150.0000.01024.18
8.2.140.0050.00224.66
8.2.130.0080.00026.16
8.2.120.0040.00419.95
8.2.110.0040.00422.47
8.2.100.0040.00819.89
8.2.90.0030.00618.28
8.2.80.0060.00318.04
8.2.70.0040.00417.93
8.2.60.0000.00818.22
8.2.50.0040.00418.10
8.2.40.0000.00719.47
8.2.30.0040.00419.34
8.2.20.0040.00418.22
8.2.10.0040.00418.98
8.2.00.0040.00419.60
8.1.330.0150.00321.98
8.1.320.0150.00616.35
8.1.310.0040.00416.67
8.1.300.0050.00318.69
8.1.290.0030.00630.84
8.1.280.0040.01525.92
8.1.270.0000.00923.90
8.1.260.0090.00026.35
8.1.250.0040.01128.09
8.1.240.0030.00522.14
8.1.230.0130.00421.01
8.1.220.0060.00317.78
8.1.210.0050.00518.77
8.1.200.0030.00917.48
8.1.190.0000.00817.48
8.1.180.0030.00618.10
8.1.170.0030.00618.62
8.1.160.0000.00718.96
8.1.150.0030.00618.96
8.1.140.0070.00018.84
8.1.130.0070.00017.64
8.1.120.0080.00017.51
8.1.110.0050.00217.64
8.1.100.0040.00317.65
8.1.90.0060.00317.55
8.1.80.0040.00417.54
8.1.70.0030.00317.50
8.1.60.0030.00517.75
8.1.50.0080.00017.56
8.1.40.0000.00917.71
8.1.30.0090.00017.83
8.1.20.0000.00917.83
8.1.10.0030.00617.61
8.1.00.0000.00817.71
8.0.300.0090.00019.91
8.0.290.0000.00916.88
8.0.280.0000.00718.54
8.0.270.0070.00017.35
8.0.260.0030.00716.85
8.0.250.0040.00417.14
8.0.240.0000.00617.02
8.0.230.0030.00317.12
8.0.220.0070.00017.09
8.0.210.0000.00817.03
8.0.200.0000.00817.13
8.0.190.0000.00817.12
8.0.180.0040.00417.06
8.0.170.0090.00317.09
8.0.160.0030.00617.06
8.0.150.0000.00816.86
8.0.140.0030.00617.02
8.0.130.0060.00013.47
8.0.120.0090.00016.95
8.0.110.0040.00417.07
8.0.100.0060.00317.05
8.0.90.0000.00716.89
8.0.80.0100.01016.99
8.0.70.0040.00417.17
8.0.60.0000.00817.05
8.0.50.0040.00416.98
8.0.30.0090.01117.25
8.0.20.0190.00717.13
8.0.10.0070.00017.13
8.0.00.0130.00717.01
7.4.330.0000.00515.55
7.4.320.0030.00316.82
7.4.300.0030.00316.70
7.4.290.0030.00316.67
7.4.280.0030.00516.71
7.4.270.0030.00316.84
7.4.260.0070.00016.61
7.4.250.0030.00316.61
7.4.240.0060.00316.86
7.4.230.0070.00016.91
7.4.220.0050.00316.85
7.4.210.0090.00916.83
7.4.200.0030.00316.86
7.4.160.0100.00616.79
7.4.140.0030.01617.86
7.4.130.0060.01216.84
7.4.120.0040.01316.64
7.4.110.0030.01416.53
7.4.100.0100.00716.73
7.4.90.0120.00616.61
7.4.80.0100.00719.39
7.4.70.0140.01116.55
7.4.60.0060.00916.45
7.4.50.0070.01016.55
7.4.40.0100.00616.61
7.4.10.0030.01414.99
7.4.00.0070.01015.17
7.3.330.0050.00013.35
7.3.320.0060.00013.32
7.3.310.0020.00516.44
7.3.300.0050.00216.37
7.3.290.0030.00316.50
7.3.280.0090.00716.42
7.3.260.0120.00616.60
7.3.240.0100.00716.62
7.3.230.0040.01316.84
7.3.210.0070.01016.78
7.3.200.0070.01016.75
7.3.190.0090.00616.45
7.3.180.0130.00316.67
7.3.170.0030.01316.41
7.3.160.0060.01116.72
7.3.130.0100.01014.74
7.3.120.0050.01215.11
7.3.110.0080.01015.04
7.3.100.0070.00915.05
7.3.90.0040.00915.15
7.3.80.0050.00514.92
7.3.70.0060.00714.93
7.3.60.0090.00614.92
7.3.50.0070.00715.01
7.3.40.0060.00715.02
7.3.30.0040.00914.93
7.3.20.0090.00516.45
7.3.10.0070.00616.44
7.3.00.0070.00816.32
7.2.330.0090.00916.86
7.2.320.0090.00916.64
7.2.310.0030.01316.85
7.2.300.0140.00616.74
7.2.290.0090.01216.64
7.2.260.0120.00615.38
7.2.250.0090.01015.33
7.2.240.0050.01215.31
7.2.230.0040.00815.27
7.2.220.0100.00715.37
7.2.210.0060.00915.41
7.2.200.0020.01215.16
7.2.190.0060.01115.17
7.2.180.0090.00515.13
7.2.170.0070.00715.20
7.2.160.0040.01115.21
7.2.150.0080.00816.65
7.2.140.0060.00616.68
7.2.130.0050.00916.63
7.2.120.0070.00916.68
7.2.110.0090.00616.63
7.2.100.0070.00816.57
7.2.90.0100.00816.69
7.2.80.0080.00916.57
7.2.70.0080.00716.72
7.2.60.0080.01016.58
7.2.50.0060.00816.62
7.2.40.0070.00616.70
7.2.30.0080.00516.71
7.2.20.0040.01116.61
7.2.10.0290.00516.64
7.2.00.0050.01016.61
7.1.330.0050.01116.13
7.1.320.0060.00916.10
7.1.310.0050.01016.12
7.1.300.0050.01015.94
7.1.290.0040.00816.00
7.1.280.0050.00815.58
7.1.270.0070.00615.37
7.1.260.0060.00815.57
7.1.250.0100.00415.51
7.1.240.0080.00516.12
7.1.230.0050.00915.95
7.1.220.0050.00815.98
7.1.210.0080.00515.89
7.1.200.0050.00815.99
7.1.190.0040.01015.98
7.1.180.0080.00415.90
7.1.170.0060.00616.07
7.1.160.0080.00616.09
7.1.150.0040.01116.01
7.1.140.0010.01115.76
7.1.130.0070.00515.99
7.1.120.0020.00915.88
7.1.110.0060.00516.08
7.1.100.0050.00816.00
7.1.90.0080.00516.06
7.1.80.0050.00816.01
7.1.70.0040.01016.09
7.1.60.0070.00616.08
7.1.50.0060.00815.91
7.1.40.0060.00716.06
7.1.30.0050.00716.02
7.1.20.0040.00716.09
7.1.10.0070.00416.03
7.1.00.0060.00616.02

preferences:
122.85 ms | 403 KiB | 5 Q