3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myString = "type:blue, type:red, shift:second, shift:first, category:circle, system:unknown"; $params = explode( ", ", $myString ); $possibleKeys = [ "category", "shift", "type", "chances" ]; $ignore = ['system']; $nodes = []; foreach ($params as $param) { $node = explode( ":", $param ); if (in_array( $node[0], $possibleKeys )) { $nodes[$node[0]][] = $node[1]; } else { $nodes[$node[0]] = $node[1]; } } foreach($ignore as $key) { unset($nodes[$key]); } print '<pre>'; print_r($nodes); print '</pre>'; ?>

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.0110.00818.28
8.5.00.0100.01119.69
8.4.150.0020.00114.05
8.4.140.0100.01217.45
8.4.130.0100.00819.03
8.4.120.0080.00824.24
8.4.110.0120.00818.78
8.4.100.0050.00517.67
8.4.90.0110.00917.64
8.4.80.0060.00319.41
8.4.70.0110.01117.75
8.4.60.0090.01018.85
8.4.50.0120.01017.70
8.4.40.0130.00717.68
8.4.30.0160.00317.48
8.4.20.0060.00320.70
8.4.10.0090.00917.51
8.3.280.0150.00718.56
8.3.270.0170.00616.48
8.3.260.0120.00916.84
8.3.250.0100.00718.89
8.3.240.0070.00217.36
8.3.230.0100.00916.68
8.3.220.0040.00516.70
8.3.210.0090.00816.75
8.3.200.0120.00716.84
8.3.190.0060.00218.99
8.3.180.0130.00616.80
8.3.170.0090.00919.05
8.3.160.0090.01018.44
8.3.150.0160.00317.23
8.3.140.0000.00819.08
8.3.130.0080.00018.28
8.3.120.0050.00519.20
8.3.110.0030.00620.94
8.3.100.0000.01524.06
8.3.90.0000.01526.77
8.3.80.0030.00617.97
8.3.70.0110.00718.30
8.3.60.0120.00318.30
8.3.50.0080.00817.55
8.3.40.0110.00418.81
8.3.30.0180.00018.84
8.3.20.0040.00418.73
8.3.10.0040.00423.51
8.3.00.0040.00423.68
8.2.290.0110.00920.26
8.2.280.0040.00418.37
8.2.270.0050.01417.20
8.2.260.0110.00416.72
8.2.250.0030.01716.75
8.2.240.0060.00319.12
8.2.230.0090.00622.58
8.2.220.0080.00037.54
8.2.210.0050.00526.77
8.2.200.0060.00316.63
8.2.190.0100.01018.33
8.2.180.0100.01016.32
8.2.170.0070.01418.88
8.2.160.0070.01022.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0000.00821.03
8.2.120.0070.00026.35
8.2.110.0030.00720.38
8.2.100.0060.00617.91
8.2.90.0040.00417.84
8.2.80.0080.00017.97
8.2.70.0030.00618.03
8.2.60.0030.00618.16
8.2.50.0000.00818.10
8.2.40.0000.00919.31
8.2.30.0070.00020.56
8.2.20.0030.00718.05
8.2.10.0000.00718.27
8.2.00.0080.00021.26
8.1.330.0120.00722.19
8.1.320.0110.00816.16
8.1.310.0140.00016.54
8.1.300.0030.01618.11
8.1.290.0030.00630.84
8.1.280.0150.00425.92
8.1.270.0040.00423.99
8.1.260.0070.01126.35
8.1.250.0070.00028.09
8.1.240.0050.00521.03
8.1.230.0090.00320.85
8.1.220.0050.00317.74
8.1.210.0060.00318.93
8.1.200.0040.00417.38
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0040.00418.46
8.1.160.0070.00018.87
8.1.150.0040.00418.89
8.1.140.0000.00918.84
8.1.130.0030.00320.23
8.1.120.0060.00317.50
8.1.110.0060.00317.31
8.1.100.0030.00617.43
8.1.90.0040.00417.45
8.1.80.0000.00717.48
8.1.70.0050.00517.50
8.1.60.0050.00317.43
8.1.50.0000.00817.49
8.1.40.0040.00417.46
8.1.30.0040.00417.67
8.1.20.0030.00517.59
8.1.10.0080.00017.49
8.1.00.0080.00417.54
8.0.300.0030.00319.98
8.0.290.0030.00616.75
8.0.280.0030.00518.37
8.0.270.0000.00717.29
8.0.260.0040.00420.21
8.0.250.0030.00316.91
8.0.240.0050.00316.96
8.0.230.0030.00516.89
8.0.220.0030.00616.98
8.0.210.0000.00716.88
8.0.200.0030.00316.84
8.0.190.0040.00416.98
8.0.180.0040.00416.95
8.0.170.0050.00316.81
8.0.160.0000.00716.95
8.0.150.0040.00716.86
8.0.140.0000.00716.88
8.0.130.0030.00313.41
8.0.120.0000.00816.86
8.0.110.0000.00816.89
8.0.100.0000.00716.84
8.0.90.0050.00216.82
8.0.80.0020.01716.92
8.0.70.0070.00016.75
8.0.60.0040.00416.73
8.0.50.0000.00716.73
8.0.30.0110.00817.16
8.0.20.0140.00917.40
8.0.10.0070.00016.89
8.0.00.0090.00816.90
7.4.330.0050.00015.55
7.4.320.0070.00016.52
7.4.300.0000.00716.61
7.4.290.0000.00616.60
7.4.280.0000.00816.53
7.4.270.0070.00016.54
7.4.260.0030.00316.47
7.4.250.0000.00716.58
7.4.240.0040.00416.45
7.4.230.0030.00316.28
7.4.220.0070.00016.50
7.4.210.0100.00716.66
7.4.200.0020.00516.40
7.4.160.0070.00816.58
7.4.140.0120.00917.86
7.4.130.0100.00716.48
7.4.120.0090.00916.54
7.4.110.0100.00616.69
7.4.100.0070.01316.43
7.4.90.0000.01916.59
7.4.80.0100.00619.39
7.4.70.0090.01216.68
7.4.60.0070.01016.51
7.4.50.0110.00716.31
7.4.40.0070.01016.59
7.4.00.0070.00714.92
7.3.330.0050.00013.24
7.3.320.0000.00513.09
7.3.310.0020.00516.29
7.3.300.0030.00316.22
7.3.290.0050.00216.34
7.3.280.0060.00816.39
7.3.260.0100.00916.46
7.3.240.0080.01016.47
7.3.230.0110.00716.36
7.3.210.0120.00616.47
7.3.200.0080.00816.53
7.3.190.0040.01416.50
7.3.180.0090.00916.69
7.3.170.0080.01216.63
7.3.160.0090.00616.64
7.2.330.0150.00616.71
7.2.320.0100.00716.78
7.2.310.0090.01216.65
7.2.300.0120.00616.69
7.2.290.0050.01116.61
7.2.110.0110.01116.50
7.2.90.0620.01314.95
7.2.80.0580.01414.51
7.2.70.0570.00615.17
7.2.60.0780.00015.21
7.2.50.0730.01115.23
7.2.40.0650.01315.13
7.2.30.0780.00615.06
7.2.20.0750.00715.30
7.2.10.0690.01314.88
7.2.00.0650.01015.13
7.1.210.0530.00313.88
7.1.200.0660.00614.05
7.1.190.0640.01013.80
7.1.180.0730.00313.98
7.1.170.0740.00613.93
7.1.160.0740.01313.76
7.1.150.0760.00314.14
7.1.140.0770.00313.86
7.1.130.0550.00713.95
7.1.120.0590.00713.84
7.1.110.0470.01013.71
7.1.100.0540.01313.94
7.1.90.0590.00713.68
7.1.80.0560.00613.80
7.1.70.0560.01014.07
7.1.60.0970.00331.96
7.1.50.1050.00631.64
7.1.40.0780.00331.93
7.1.30.0940.01032.10
7.1.20.1870.00331.80
7.1.10.0550.00714.00
7.1.00.0650.01013.96

preferences:
42.75 ms | 403 KiB | 5 Q