3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getColors($item_colors, $result = []){ preg_match_all('/(\w+),|(\w+)\/(\w+)/', $item_colors, $colors); foreach ($colors as $key => $value) { if ($key === 0) continue; array_push($result, ...$value); } return array_filter($result); } $item_colors = "Vario Base Unit with steel, large, black/orange"; echo implode(' ', getColors($item_colors)); //steel large black orange var_dump(getColors($item_colors)); // array(4) { // [0]=> // string(5) "steel" // [1]=> // string(5) "large" // [5]=> // string(5) "black" // [8]=> // string(6) "orange" // }

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.0060.01018.55
8.3.50.0100.00318.39
8.3.40.0040.01118.82
8.3.30.0060.00918.65
8.3.20.0070.00024.18
8.3.10.0060.00324.66
8.3.00.0000.00826.16
8.2.180.0170.00025.92
8.2.170.0110.00619.04
8.2.160.0140.00322.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00320.74
8.2.110.0000.00922.39
8.2.100.0040.00818.03
8.2.90.0000.00817.75
8.2.80.0000.00818.89
8.2.70.0030.00617.93
8.2.60.0000.01018.16
8.2.50.0000.00818.10
8.2.40.0040.00421.23
8.2.30.0050.00219.39
8.2.20.0040.00418.09
8.2.10.0080.00019.22
8.2.00.0030.00619.28
8.1.280.0090.00625.92
8.1.270.0000.00823.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.82
8.1.230.0000.01120.85
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0060.00317.35
8.1.180.0080.00018.10
8.1.170.0090.00018.66
8.1.160.0070.00019.05
8.1.150.0000.00718.80
8.1.140.0000.00818.93
8.1.130.0050.00220.24
8.1.120.0040.00417.63
8.1.110.0000.01117.67
8.1.100.0040.00417.59
8.1.90.0040.00417.55
8.1.80.0040.00417.54
8.1.70.0030.00317.59
8.1.60.0000.00817.78
8.1.50.0030.00617.71
8.1.40.0000.00817.72
8.1.30.0040.00417.81
8.1.20.0070.00317.65
8.1.10.0000.00717.67
8.1.00.0000.00917.59
8.0.300.0050.00318.77
8.0.290.0040.00416.88
8.0.280.0000.00718.54
8.0.270.0000.00718.15
8.0.260.0000.00618.47
8.0.250.0070.00016.99
8.0.240.0000.00817.10
8.0.230.0040.00417.08
8.0.220.0000.00716.95
8.0.210.0000.00817.06
8.0.200.0000.00716.97
8.0.190.0040.00417.09
8.0.180.0080.00316.96
8.0.170.0000.00917.05
8.0.160.0050.00217.02
8.0.150.0050.00317.04
8.0.140.0030.00616.89
8.0.130.0030.00313.45
8.0.120.0040.00416.89
8.0.110.0030.00517.01
8.0.100.0040.00416.98
8.0.90.0000.00716.87
8.0.80.0100.00517.01
8.0.70.0000.00817.03
8.0.60.0000.00716.95
8.0.50.0000.00816.93
8.0.30.0070.01017.23
8.0.20.0090.00817.26
8.0.10.0140.01117.43
8.0.00.0110.01517.12
7.4.330.0000.00616.74
7.4.320.0030.00316.68
7.4.300.0040.00416.78
7.4.290.0050.00316.76
7.4.280.0060.00316.67
7.4.270.0030.00316.84
7.4.260.0050.00013.54
7.4.250.0020.00516.57
7.4.240.0040.00416.66
7.4.230.0050.00316.62
7.4.220.0020.00516.89
7.4.210.0090.00516.71
7.4.200.0030.00416.54
7.4.150.0070.00916.71
7.4.140.0110.01116.62
7.4.130.0120.01016.68
7.4.120.0170.00416.68
7.4.110.0100.01116.70
7.4.100.0130.01016.67
7.4.90.0140.00816.64
7.4.80.0110.01216.51
7.4.70.0130.00616.55
7.4.60.0110.01216.71
7.4.50.0160.00816.72
7.4.40.0150.00916.66
7.4.30.0120.01116.63
7.4.20.0110.01416.67
7.4.10.0180.00516.50
7.4.00.0140.00916.73
7.3.330.0040.00416.57
7.3.320.0030.00313.51
7.3.310.0000.00716.54
7.3.300.0040.00416.45
7.3.290.0060.01116.47
7.3.270.0160.00816.59
7.3.260.0120.01116.54
7.3.250.0120.01116.67
7.3.240.0060.01516.54
7.3.230.0100.01116.63
7.3.220.0120.00916.51
7.3.210.0060.01416.53
7.3.200.0100.01116.70
7.3.190.0100.01016.69
7.3.180.0130.00816.76
7.3.170.0170.00516.48
7.3.160.0110.01216.75
7.3.150.0110.01016.70
7.3.140.0160.00816.66
7.3.130.0100.00916.73
7.3.120.0140.00816.46
7.3.110.0070.01316.50
7.3.100.0170.00816.61
7.3.90.0100.01416.61
7.3.80.0130.00716.50
7.3.70.0120.00616.39
7.3.60.0110.01116.52
7.3.50.0150.01016.43
7.3.40.0140.01016.47
7.3.30.0120.01116.55
7.3.20.0160.00916.57
7.3.10.0140.00816.65
7.3.00.0150.01016.64
7.2.340.0180.01216.58
7.2.330.0330.01417.05
7.2.320.0390.00417.00
7.2.310.0200.01516.73
7.2.300.0280.01516.91
7.2.290.0200.01716.71
7.2.280.0330.00916.84
7.2.270.0260.01316.83
7.2.260.0250.01416.76
7.2.250.0290.00916.82
7.2.240.0240.01616.99
7.2.230.0240.01216.87
7.2.220.0240.01016.92
7.2.210.0270.00916.82
7.2.200.0250.01116.73
7.2.190.0320.00716.77
7.2.180.0260.01316.74
7.2.170.0260.01616.83
7.2.160.0290.01116.73
7.2.150.0310.00617.01
7.2.140.0240.01216.71
7.2.130.0250.01116.82
7.2.120.0270.00816.81
7.2.110.0250.01416.76
7.2.100.0140.02116.83
7.2.90.0230.01016.90
7.2.80.0280.01117.05
7.2.70.0280.00716.80
7.2.60.0130.01917.04
7.2.50.0210.01316.84
7.2.40.0280.00716.83
7.2.30.0260.01017.01
7.2.20.0230.00816.78
7.2.10.0270.00916.68
7.2.00.0310.00316.80
7.1.330.0320.00415.93
7.1.320.0150.01815.79
7.1.310.0270.00715.80
7.1.300.0290.00315.77
7.1.290.0290.01615.70
7.1.280.0310.00915.84
7.1.270.0310.00315.79
7.1.260.0250.00815.66
7.1.250.0260.00915.71
7.1.240.0340.00715.79
7.1.230.0130.02615.56
7.1.220.0240.01015.62
7.1.210.0250.00615.63
7.1.200.0230.00715.80
7.1.190.0240.00715.82
7.1.180.0160.01615.84
7.1.170.0260.01115.86
7.1.160.0210.01815.80
7.1.150.0150.01515.70
7.1.140.0260.00515.77
7.1.130.0180.01715.81
7.1.120.0200.01515.66
7.1.110.0260.00615.93
7.1.100.0240.00915.51
7.1.90.0240.00615.96
7.1.80.0170.01415.81
7.1.70.0210.01015.86
7.1.60.0150.02115.95
7.1.50.0200.01015.66
7.1.40.0300.00615.79
7.1.30.0330.00715.73
7.1.20.0250.00615.75
7.1.10.0250.00715.97
7.1.00.0250.01215.85
7.0.330.0280.01815.27
7.0.320.0240.00715.56
7.0.310.0220.00715.41
7.0.300.0210.01215.43
7.0.290.0170.01315.38
7.0.280.0270.00715.37
7.0.270.0210.00915.47
7.0.260.0160.01315.34
7.0.250.0240.00715.51
7.0.240.0260.00415.43
7.0.230.0140.01415.49
7.0.220.0250.00415.51
7.0.210.0100.01415.40
7.0.200.0600.01015.37
7.0.190.0180.01115.49
7.0.180.0210.00715.43
7.0.170.0300.00715.64
7.0.160.0280.00615.33
7.0.150.0170.00715.59
7.0.140.0040.02115.43
7.0.130.0200.01615.28
7.0.120.0140.01415.37
7.0.110.0160.01015.61
7.0.100.0240.00515.54
7.0.90.0620.02415.27
7.0.80.0320.02415.49
7.0.70.0210.00915.51
7.0.60.0390.00715.61
7.0.50.0250.01015.31
7.0.40.0630.01015.46
7.0.30.0210.00815.43
7.0.20.0230.00515.41
7.0.10.0390.01415.43
7.0.00.0180.01415.31
5.6.400.0220.01516.02
5.6.390.0310.00716.19
5.6.380.0200.01016.23
5.6.370.0140.01816.02
5.6.360.0180.01115.84
5.6.350.0190.01216.11
5.6.340.0230.00915.83
5.6.330.0280.00416.32
5.6.320.0150.01616.12
5.6.310.0240.00815.90
5.6.300.0160.01215.78
5.6.290.0260.00915.64
5.6.280.0200.00816.14
5.6.270.0250.00616.05
5.6.260.0240.00615.69
5.6.250.0190.01515.75
5.6.240.0540.03215.91
5.6.230.0290.01216.06
5.6.220.0290.00716.03
5.6.210.0250.01316.06
5.6.200.0250.01015.75
5.6.190.0160.01216.23
5.6.180.0210.01116.11
5.6.170.0230.01316.10
5.6.160.0190.01316.01
5.6.150.0200.01016.13
5.6.140.0290.00316.01
5.6.130.0190.01215.92
5.6.120.0310.00016.10
5.6.110.0240.00815.96
5.6.100.0210.01016.00
5.6.90.0300.00415.77
5.6.80.0190.01116.06
5.6.70.0200.01216.00
5.6.60.0150.01515.84
5.6.50.0290.00415.80
5.6.40.0290.00716.21
5.6.30.0310.00416.01
5.6.20.0380.01415.96
5.6.10.0110.01915.75
5.6.00.0250.01515.64
5.5.380.0200.00015.44
5.5.370.0320.01515.39
5.5.360.0250.00915.53
5.5.350.0160.02015.44
5.5.340.0320.02415.73
5.5.330.0250.00915.44
5.5.320.0280.01315.68
5.5.310.0190.01315.54
5.5.300.0290.01015.84
5.5.290.0210.01215.50
5.5.280.0310.00315.83
5.5.270.0270.00615.63
5.5.260.0250.01415.52
5.5.250.0280.00915.39
5.5.240.0230.00715.53
5.5.230.0270.00415.55
5.5.220.0180.01115.32
5.5.210.0220.00915.64
5.5.200.0240.00715.64
5.5.190.0270.01015.57
5.5.180.0190.01115.59
5.5.170.0240.01415.78
5.5.160.0210.00815.59
5.5.150.0170.01415.63
5.5.140.0240.01215.48
5.5.130.0190.01915.39
5.5.120.0150.01615.38
5.5.110.0260.00615.64
5.5.100.0140.01515.37
5.5.90.0240.00515.29
5.5.80.0240.01215.32
5.5.70.0230.01215.64
5.5.60.0300.01015.32
5.5.50.0160.01715.65
5.5.40.0260.00415.43
5.5.30.0280.00615.65
5.5.20.0380.01115.51
5.5.10.0190.01315.26
5.5.00.0300.00015.39
5.4.450.0070.01112.48
5.4.440.0140.01012.58
5.4.430.0170.00712.55
5.4.420.0160.00912.47
5.4.410.0190.00412.51
5.4.400.0140.01012.30
5.4.390.0200.00312.27
5.4.380.0190.00412.29
5.4.370.0230.00012.38
5.4.360.0200.00312.46
5.4.350.0250.00012.46
5.4.340.0170.00712.44
5.4.330.0200.00612.37
5.4.320.0160.01012.25
5.4.310.0210.00512.41
5.4.300.0160.00712.28
5.4.290.0240.00312.44
5.4.280.0190.00912.56
5.4.270.0250.00312.27
5.4.260.0210.00412.43
5.4.250.0100.01412.57
5.4.240.0150.01112.21
5.4.230.0200.00612.19
5.4.220.0220.00312.38
5.4.210.0210.00712.48
5.4.200.0250.00612.27
5.4.190.0240.00412.54
5.4.180.0180.01212.54
5.4.170.0130.00912.39
5.4.160.0230.00812.23
5.4.150.0150.01012.23
5.4.140.0140.01112.38
5.4.130.0180.00712.24
5.4.120.0170.00712.58
5.4.110.0110.00812.37
5.4.100.0140.01012.35
5.4.90.0220.00612.25
5.4.80.0190.00612.45
5.4.70.0140.01112.35
5.4.60.0220.00912.29
5.4.50.0150.01312.34
5.4.40.0130.01012.38
5.4.30.0130.01312.45
5.4.20.0200.00312.46
5.4.10.0170.01012.44
5.4.00.0190.00612.22
5.3.290.0200.00812.77
5.3.280.0100.01412.93
5.3.270.0190.00612.72
5.3.260.0130.01313.00
5.3.250.0140.01112.88
5.3.240.0160.01112.74
5.3.230.0180.00712.71
5.3.220.0190.00612.65
5.3.210.0140.00812.64
5.3.200.0180.01212.71
5.3.190.0190.00812.90
5.3.180.0240.00612.84
5.3.170.0190.00612.97
5.3.160.0190.01212.97
5.3.150.0280.00412.84
5.3.140.0120.01812.80
5.3.130.0210.00412.77
5.3.120.0230.00412.91
5.3.110.0210.00413.05
5.3.100.0180.00612.77
5.3.90.0190.00812.98
5.3.80.0150.00912.70
5.3.70.0110.01412.89
5.3.60.0150.01212.77
5.3.50.0130.01312.82
5.3.40.0190.01012.74
5.3.30.0130.01012.82
5.3.20.0190.00612.73
5.3.10.0200.00312.49
5.3.00.0110.01412.48
5.2.170.0170.00711.95
5.2.160.0220.00311.79
5.2.150.0100.01311.78
5.2.140.0170.00511.72
5.2.130.0170.00611.71
5.2.120.0110.01211.78
5.2.110.0180.00411.88
5.2.100.0180.00411.86
5.2.90.0120.01211.73
5.2.80.0190.01111.80
5.2.70.0190.00811.64
5.2.60.0150.00611.58
5.2.50.0110.01411.73
5.2.40.0180.00411.69
5.2.30.0160.00611.66
5.2.20.0100.01011.56
5.2.10.0120.01211.42
5.2.00.0160.00311.36
5.1.60.0100.00911.07
5.1.50.0130.00610.71
5.1.40.0070.01110.87
5.1.30.0070.01110.96
5.1.20.0160.00410.78
5.1.10.0120.00611.10
5.1.00.0160.00310.75
5.0.50.0120.00410.18
5.0.40.0110.0049.88
5.0.30.0110.0049.82
5.0.20.0080.00610.13
5.0.10.0050.0119.86
5.0.00.0110.0059.64
4.4.90.0070.0028.93
4.4.80.0090.0038.93
4.4.70.0050.0058.93
4.4.60.0120.0048.93
4.4.50.0140.0008.93
4.4.40.0060.0068.93
4.4.30.0040.0048.93
4.4.20.0090.0008.93
4.4.10.0110.0008.93
4.4.00.0120.0008.93
4.3.110.0090.0008.93
4.3.100.0040.0048.93
4.3.90.0050.0058.93
4.3.80.0050.0058.93
4.3.70.0060.0038.93
4.3.60.0070.0028.93
4.3.50.0060.0068.93
4.3.40.0070.0048.93
4.3.30.0060.0028.93
4.3.20.0080.0008.93
4.3.10.0030.0068.93
4.3.00.0080.0038.93

preferences:
58.07 ms | 400 KiB | 5 Q