3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myString = "type:blue, type:red, shift:second, shift:first, category:circle, system:unknown"; $possibleKeys = [ "category", "shift", "type" ]; Foreach($possibleKeys as $key){ preg_match_all("/" . $key . ":(.*?),/", $myString, $m); $new[$key] = $m[1]; } Var_dump($new);

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.0130.00618.77
8.5.00.0100.01120.41
8.4.150.0030.00014.05
8.4.140.0100.01017.89
8.4.130.0120.00818.08
8.4.120.0090.00620.56
8.4.110.0090.00919.01
8.4.100.0120.00618.13
8.4.90.0050.00417.97
8.4.80.0040.01018.02
8.4.70.0150.00518.06
8.4.60.0140.00820.54
8.4.50.0080.01422.48
8.4.40.0120.00418.00
8.4.30.0070.01417.91
8.4.20.0000.00920.76
8.4.10.0040.00817.83
8.3.280.0140.00918.74
8.3.270.0120.00816.57
8.3.260.0120.00916.38
8.3.250.0120.00718.70
8.3.240.0110.00816.69
8.3.230.0130.00616.98
8.3.220.0040.00419.02
8.3.210.0110.00916.82
8.3.200.0070.01316.75
8.3.190.0100.00516.59
8.3.180.0100.00916.63
8.3.170.0180.00016.54
8.3.160.0160.00318.23
8.3.150.0180.00017.13
8.3.140.0050.00317.21
8.3.130.0070.01118.40
8.3.120.0060.00320.54
8.3.110.0140.00716.83
8.3.100.0080.00016.73
8.3.90.0050.00316.91
8.3.80.0030.00717.97
8.3.70.0120.00316.73
8.3.60.0100.01318.68
8.3.50.0080.00717.55
8.3.40.0060.00918.91
8.3.30.0000.01519.01
8.3.20.0080.00018.98
8.3.10.0060.00323.48
8.3.00.0060.00321.90
8.2.290.0070.00219.01
8.2.280.0140.00622.51
8.2.270.0080.00016.96
8.2.260.0080.00016.83
8.2.250.0140.00418.48
8.2.240.0000.00919.17
8.2.230.0040.00420.94
8.2.220.0080.01124.06
8.2.210.0040.00426.77
8.2.200.0030.00618.67
8.2.190.0120.00316.63
8.2.180.0100.00616.63
8.2.170.0110.00422.96
8.2.160.0140.00019.19
8.2.150.0060.00324.18
8.2.140.0090.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00221.16
8.2.110.0070.00322.43
8.2.100.0060.00617.88
8.2.90.0080.00019.34
8.2.80.0080.00017.97
8.2.70.0000.00917.88
8.2.60.0050.00317.75
8.2.50.0050.00317.75
8.2.40.0000.00819.42
8.2.30.0050.00220.66
8.2.20.0050.00318.17
8.2.10.0000.00718.34
8.2.00.0080.00019.39
8.1.330.0110.00818.27
8.1.320.0130.00816.45
8.1.310.0080.00016.59
8.1.300.0000.00820.33
8.1.290.0030.00618.88
8.1.280.0150.00025.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.69
8.1.230.0040.00817.61
8.1.220.0070.00417.79
8.1.210.0030.00618.77
8.1.200.0000.00817.66
8.1.190.0080.00017.47
8.1.180.0050.00318.10
8.1.170.0050.00518.36
8.1.160.0000.00718.82
8.1.150.0000.00718.79
8.1.140.0000.00818.92
8.1.130.0030.00320.42
8.1.120.0040.00417.61
8.1.110.0040.00417.63
8.1.100.0000.00817.44
8.1.90.0070.00017.67
8.1.80.0040.00417.59
8.1.70.0000.00817.54
8.1.60.0080.00017.80
8.1.50.0080.00017.72
8.1.40.0080.00017.58
8.1.30.0030.00517.71
8.1.20.0040.00417.77
8.1.10.0060.00317.75
8.1.00.0000.00817.63
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0000.00718.38
8.0.270.0030.00317.33
8.0.260.0000.00720.23
8.0.250.0070.00017.05
8.0.240.0080.00017.11
8.0.230.0040.00417.00
8.0.220.0060.00316.96
8.0.210.0000.00716.98
8.0.200.0000.00717.09
8.0.190.0050.00317.15
8.0.180.0000.00817.06
8.0.170.0000.00816.93
8.0.160.0040.00416.94
8.0.150.0040.00316.99
8.0.140.0070.00016.86
8.0.130.0000.00613.51
8.0.120.0000.00916.94
8.0.110.0030.00616.87
8.0.100.0000.00717.04
8.0.90.0050.00216.96
8.0.80.0070.00917.02
8.0.70.0040.00416.93
8.0.60.0000.00716.93
8.0.50.0020.00517.04
8.0.30.0080.00917.17
8.0.20.0090.01117.40
8.0.10.0040.00417.07
8.0.00.0110.00716.91
7.4.330.0000.00515.55
7.4.320.0070.00316.66
7.4.300.0040.00416.82
7.4.290.0000.00716.78
7.4.280.0050.00316.72
7.4.270.0050.00216.73
7.4.260.0070.00016.65
7.4.250.0000.00716.61
7.4.240.0030.00316.71
7.4.230.0070.00016.76
7.4.220.0050.00316.57
7.4.210.0070.00716.65
7.4.200.0000.00716.86
7.4.160.0070.00916.72
7.4.140.0100.00817.86
7.4.130.0160.01016.84
7.4.120.0110.01016.66
7.4.110.0090.00916.83
7.4.100.0090.01016.49
7.4.90.0120.00916.77
7.4.80.0060.01219.39
7.4.70.0110.00616.68
7.4.60.0060.01116.42
7.4.50.0100.00616.56
7.4.40.0070.01716.79
7.4.00.0030.01315.39
7.3.330.0020.00213.36
7.3.320.0050.00013.24
7.3.310.0000.00716.43
7.3.300.0040.00416.40
7.3.290.0000.00716.32
7.3.280.0100.00716.42
7.3.260.0100.01016.73
7.3.240.0050.01216.60
7.3.230.0060.01216.62
7.3.210.0080.01216.57
7.3.200.0050.01116.46
7.3.190.0100.00716.69
7.3.180.0070.01516.41
7.3.170.0000.01916.59
7.3.160.0030.01916.61
7.2.330.0080.01016.82
7.2.320.0090.01616.70
7.2.310.0120.01216.81
7.2.300.0110.00616.84
7.2.290.0110.00516.89
7.2.90.2560.01315.02
7.2.80.2450.01014.68
7.2.70.2380.01314.95
7.2.60.2680.00715.32
7.2.50.3290.00315.03
7.2.40.3290.00314.94
7.2.30.3330.01015.15
7.2.20.3420.01015.13
7.2.10.3430.01314.94
7.2.00.3630.01014.96
7.1.210.3650.01913.97
7.1.200.3300.00314.27
7.1.190.2160.00714.06
7.1.180.2620.01013.95
7.1.170.3720.00314.11
7.1.160.3840.01014.04
7.1.150.3420.00313.77
7.1.140.2920.00614.28
7.1.130.2890.00314.21
7.1.120.3760.01014.15
7.1.110.3710.00714.00
7.1.100.3710.00714.02
7.1.90.7670.00713.98
7.1.80.8900.01314.14
7.1.70.6300.00314.01
7.1.60.4900.01032.18
7.1.50.7340.01732.07
7.1.41.0340.00631.62
7.1.30.8240.00731.53
7.1.20.9410.01031.48
7.1.10.7760.00313.96
7.1.00.5260.01314.02

preferences:
41.37 ms | 403 KiB | 5 Q