3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^([^{]+)(?:\{(.+)\})?$/'; $str = 'type{test}'; preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0); // Print the entire match result var_dump($matches);

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.0110.00416.71
8.3.50.0070.00716.74
8.3.40.0070.00718.79
8.3.30.0060.00918.84
8.3.20.0070.00020.38
8.3.10.0000.00821.91
8.3.00.0030.00519.47
8.2.180.0070.01018.41
8.2.170.0110.00422.96
8.2.160.0080.00620.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00019.09
8.2.120.0040.00426.35
8.2.110.0030.00620.57
8.2.100.0060.00617.91
8.2.90.0040.00419.18
8.2.80.0080.00017.97
8.2.70.0030.00717.75
8.2.60.0040.00418.04
8.2.50.0080.00018.10
8.2.40.0050.00220.42
8.2.30.0040.00419.12
8.2.20.0000.00817.93
8.2.10.0000.00717.88
8.2.00.0070.00017.91
8.1.280.0100.00725.92
8.1.270.0070.00022.05
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0140.00423.86
8.1.230.0030.00922.70
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0080.00017.22
8.1.180.0000.00718.10
8.1.170.0040.00418.63
8.1.160.0000.00819.02
8.1.150.0000.00720.64
8.1.140.0040.00419.46
8.1.130.0000.00818.78
8.1.120.0000.00717.61
8.1.110.0040.00417.36
8.1.100.0080.00017.52
8.1.90.0060.00317.59
8.1.80.0000.00717.53
8.1.70.0000.00717.40
8.1.60.0080.00017.70
8.1.50.0040.00417.63
8.1.40.0030.00517.48
8.1.30.0050.00317.76
8.1.20.0030.00717.63
8.1.10.0040.00417.67
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0000.00717.08
8.0.260.0000.00716.82
8.0.250.0070.00016.94
8.0.240.0030.00516.93
8.0.230.0000.00716.90
8.0.220.0030.00317.00
8.0.210.0000.00816.79
8.0.200.0030.00316.87
8.0.190.0000.00916.93
8.0.180.0000.00716.99
8.0.170.0000.00717.05
8.0.160.0000.00716.95
8.0.150.0050.00216.86
8.0.140.0070.00016.81
8.0.130.0030.00413.47
8.0.120.0080.00016.94
8.0.110.0000.00816.93
8.0.100.0070.00016.85
8.0.90.0000.00716.93
8.0.80.0040.01316.96
8.0.70.0050.00216.88
8.0.60.0000.00817.08
8.0.50.0040.00417.01
8.0.30.0080.00817.09
8.0.20.0100.01017.40
8.0.10.0000.00817.12
8.0.00.0170.00816.66
7.4.330.0030.00315.55
7.4.320.0030.00316.65
7.4.300.0060.00016.74
7.4.290.0000.00716.63
7.4.280.0070.00016.64
7.4.270.0070.00016.54
7.4.260.0000.00613.43
7.4.250.0040.00416.50
7.4.240.0030.00516.79
7.4.230.0030.00316.57
7.4.220.0090.01516.82
7.4.210.0120.00616.68
7.4.200.0030.00316.73
7.4.160.0120.00416.41
7.4.150.0120.00617.40
7.4.140.0130.01117.86
7.4.130.0110.00816.43
7.4.120.0130.00616.64
7.4.110.0140.00316.73
7.4.100.0140.00416.39
7.4.90.0000.01616.39
7.4.80.0030.02019.39
7.4.70.0110.00916.62
7.4.60.0000.01616.54
7.4.50.0100.01016.69
7.4.40.0150.00916.40
7.4.30.0030.01516.41
7.4.00.0080.00515.05
7.3.330.0050.00013.16
7.3.320.0060.00013.15
7.3.310.0030.00516.22
7.3.300.0000.00716.31
7.3.290.0050.00216.28
7.3.280.0080.00916.28
7.3.270.0030.01417.40
7.3.260.0070.01016.49
7.3.250.0150.00516.33
7.3.240.0120.00516.42
7.3.230.0140.00816.28
7.3.210.0130.01016.23
7.3.200.0170.00016.37
7.3.190.0100.00716.71
7.3.180.0110.00516.40
7.3.170.0070.01816.16
7.3.160.0150.00316.26
7.3.120.0110.00815.00
7.3.110.0030.01314.94
7.3.100.0030.00914.75
7.3.90.0030.00915.11
7.3.80.0090.00614.68
7.3.70.0040.00814.55
7.3.60.0060.00614.90
7.3.50.0080.01114.90
7.3.40.0040.01414.90
7.3.30.0100.00314.61
7.3.20.0060.01016.85
7.3.10.0080.00716.69
7.3.00.0090.00616.66
7.2.330.0070.01116.43
7.2.320.0030.01316.63
7.2.310.0120.00416.52
7.2.300.0030.01416.70
7.2.290.0060.01016.48
7.2.250.0100.00715.14
7.2.240.0070.01414.77
7.2.230.0150.00315.17
7.2.220.0060.00615.12
7.2.210.0000.00915.04
7.2.200.0000.01514.92
7.2.190.0080.00415.08
7.2.180.0040.01514.98
7.2.170.0090.00615.07
7.2.130.0000.01616.44
7.2.120.0180.01216.40
7.2.110.0120.00316.59
7.2.100.0120.00916.54
7.2.90.0140.00915.70
7.2.80.0210.00815.54
7.2.70.0160.00215.76
7.2.60.0140.00815.55
7.2.50.0110.01115.70
7.2.40.0130.00515.71
7.2.30.0650.00515.90
7.2.20.0170.00215.85
7.2.10.1170.00615.76
7.2.00.0070.01115.77
7.1.330.0070.01015.68
7.1.320.0070.00715.52
7.1.310.0060.00616.00
7.1.300.0040.01116.05
7.1.290.0030.01416.02
7.1.280.0070.00715.81
7.1.270.0030.00615.79
7.1.260.0120.00015.95
7.1.250.0150.00315.45
7.1.210.0150.00013.68
7.1.200.0120.00813.88
7.1.190.0280.00813.88
7.1.180.1350.01014.12
7.1.170.2000.01014.01
7.1.160.0080.01113.88
7.1.150.0130.00914.00
7.1.140.0070.01114.08
7.1.130.0060.00914.02
7.1.120.0180.00013.67
7.1.110.0150.00314.07
7.1.100.0420.00814.02
7.1.90.1770.01613.91
7.1.80.0190.00413.86
7.1.70.0220.00613.95
7.1.60.0240.01431.98
7.1.50.1390.00031.95
7.1.40.0340.00331.96
7.1.30.1220.00731.84
7.1.20.0360.01031.83
7.1.10.1240.00313.96
7.1.00.0440.00713.93
7.0.310.1000.00913.48
7.0.300.0420.00313.70
7.0.290.2890.00713.57
7.0.280.0300.00313.68
7.0.270.1300.00613.54
7.0.260.0430.00313.62
7.0.250.0370.00313.67
7.0.240.1560.01013.55
7.0.230.0080.00813.32
7.0.220.0080.01113.59
7.0.210.1690.00013.53
7.0.200.0030.01513.59
7.0.190.0110.01113.33
7.0.180.1020.01013.47
7.0.170.0270.00313.63
7.0.160.2220.00313.73
7.0.150.1350.00313.50
7.0.140.0150.00813.64
7.0.130.0140.00313.58
7.0.120.0120.00913.55
7.0.110.0130.00013.45
7.0.100.0210.01013.46
7.0.90.0390.00413.66
7.0.80.0100.00713.59
7.0.70.0460.00913.48
7.0.60.0090.01313.35
7.0.50.0160.00013.76
7.0.40.0380.00613.66
7.0.30.0130.00013.65
7.0.20.0170.00313.26
7.0.10.0090.00913.58
7.0.00.0000.01413.42

preferences:
51.72 ms | 400 KiB | 5 Q