3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "text text text text [hello] text (hello2) (hello3) text"; $pattern = '/^\[([^)]*)\]/'; preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3); print_r($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.70.0140.00718.56
8.3.60.0150.00016.75
8.3.50.0070.01222.00
8.3.40.0110.00418.88
8.3.30.0110.00418.71
8.3.20.0040.00420.16
8.3.10.0070.00021.73
8.3.00.0040.00419.25
8.2.180.0040.01118.54
8.2.170.0110.00722.96
8.2.160.0080.00520.38
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00822.43
8.2.110.0060.00322.26
8.2.100.0000.01218.03
8.2.90.0060.00319.23
8.2.80.0000.00917.97
8.2.70.0050.00317.63
8.2.60.0030.00719.33
8.2.50.0040.00418.07
8.2.40.0000.00919.95
8.2.30.0040.00419.86
8.2.20.0050.00317.81
8.2.10.0080.00017.88
8.2.00.0080.00317.77
8.1.280.0160.00325.92
8.1.270.0040.00423.95
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.77
8.1.230.0040.00819.12
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0060.00317.41
8.1.180.0030.00618.10
8.1.170.0040.00418.59
8.1.160.0000.00722.00
8.1.150.0000.00918.71
8.1.140.0070.00017.57
8.1.130.0030.00317.85
8.1.120.0040.00417.44
8.1.110.0060.00317.50
8.1.100.0030.00517.43
8.1.90.0070.00017.56
8.1.80.0030.00617.46
8.1.70.0000.00717.47
8.1.60.0030.00617.62
8.1.50.0040.00417.60
8.1.40.0040.00417.59
8.1.30.0090.00017.68
8.1.20.0040.00417.79
8.1.10.0040.00417.68
8.1.00.0040.00417.47
8.0.300.0040.00419.15
8.0.290.0050.00217.15
8.0.280.0030.00318.36
8.0.270.0070.00017.20
8.0.260.0030.00317.19
8.0.250.0030.00316.93
8.0.240.0030.00317.04
8.0.230.0000.00716.88
8.0.220.0000.00616.85
8.0.210.0000.00716.91
8.0.200.0000.00816.90
8.0.190.0040.00416.98
8.0.180.0040.00417.00
8.0.170.0040.00417.05
8.0.160.0030.00316.91
8.0.150.0080.00016.89
8.0.140.0030.00516.93
8.0.130.0000.00513.45
8.0.120.0000.00716.85
8.0.110.0040.00416.92
8.0.100.0040.00416.85
8.0.90.0040.00416.91
8.0.80.0060.00916.97
8.0.70.0000.00716.93
8.0.60.0080.00016.83
8.0.50.0030.00417.07
8.0.30.0090.00917.09
8.0.20.0080.01117.40
8.0.10.0040.00417.04
8.0.00.0080.01116.82
7.4.330.0000.00415.00
7.4.320.0000.00616.77
7.4.300.0000.00716.55
7.4.290.0030.00316.74
7.4.280.0030.00916.72
7.4.270.0070.00016.53
7.4.260.0000.00716.60
7.4.250.0000.00716.60
7.4.240.0030.00416.68
7.4.230.0030.00316.64
7.4.220.0090.00916.74
7.4.210.0070.00716.68
7.4.200.0040.00416.77
7.4.190.0000.00716.82
7.4.160.0060.01016.73
7.4.150.0120.00617.40
7.4.140.0090.01017.86
7.4.130.0110.00916.52
7.4.120.0110.00616.56
7.4.110.0170.00316.42
7.4.100.0130.01016.51
7.4.90.0130.00416.64
7.4.80.0080.00819.39
7.4.70.0140.00316.56
7.4.60.0120.00616.41
7.4.50.0000.00816.52
7.4.40.0090.01516.56
7.4.30.0060.01016.57
7.4.00.0100.00314.82
7.3.330.0000.00613.19
7.3.320.0000.00613.25
7.3.310.0040.00316.09
7.3.300.0030.00316.29
7.3.290.0090.00616.32
7.3.280.0120.00716.26
7.3.270.0060.01117.40
7.3.260.0100.00716.62
7.3.250.0110.01016.31
7.3.240.0080.00816.56
7.3.230.0120.00616.39
7.3.210.0140.00316.50
7.3.200.0100.01019.39
7.3.190.0100.01316.51
7.3.180.0090.00616.37
7.3.170.0080.00816.71
7.3.160.0110.00416.23
7.3.120.0080.00814.92
7.2.330.0150.00316.73
7.2.320.0150.00616.41
7.2.310.0070.01316.47
7.2.300.0120.00916.50
7.2.290.0130.00916.74
7.2.00.0060.00619.39
7.1.100.0030.00918.53
7.1.70.0050.00317.01
7.1.60.0210.00319.46
7.1.50.0160.00434.93
7.1.00.0030.07322.32
7.0.200.0140.00314.55
7.0.140.0070.07022.05
7.0.60.0070.05019.93
7.0.50.0100.04717.82
7.0.40.0100.07720.09
7.0.30.0270.07320.05
7.0.20.0200.04020.15
7.0.10.0170.05020.19
7.0.00.0100.08720.21
5.6.280.0030.07320.91
5.6.210.0070.08020.46
5.6.200.0130.08318.17
5.6.190.0070.06320.43
5.6.180.0600.07020.41
5.6.170.0330.08320.38
5.6.160.0130.04320.41
5.6.150.0100.04318.15
5.6.140.0100.07018.11
5.6.130.0170.03318.18
5.6.120.0130.03721.02
5.6.110.0100.07721.04
5.6.100.0100.07720.95
5.6.90.0030.07020.87
5.6.80.0100.08020.37
5.5.350.3800.04720.46
5.5.340.0070.06717.95
5.5.330.0070.03720.57
5.5.320.0300.05020.24
5.5.310.0270.07320.07
5.5.300.0030.05718.01
5.5.290.0030.08317.95
5.5.280.0100.05320.88
5.5.270.0070.05320.78
5.5.260.0030.05320.66
5.5.250.0200.07320.45
5.5.240.0070.03320.12
5.4.450.0870.06719.13
5.4.440.1030.07719.59
5.4.430.0170.05319.09
5.4.420.0830.05719.44
5.4.410.0830.06019.33
5.4.400.0870.05019.24
5.4.390.0630.05719.08
5.4.380.0170.06318.72
5.4.370.0300.05018.56
5.4.360.0300.05018.70
5.4.350.0270.06018.57
5.4.340.0230.05718.66
5.4.320.0030.04012.45
5.4.310.0080.05112.45
5.4.300.0060.04112.45
5.4.290.0150.09212.44
5.4.280.0070.04612.34
5.4.270.0100.06812.34
5.4.260.0150.05612.34
5.4.250.0060.06212.34
5.4.240.0120.12212.34
5.4.230.0230.11412.33
5.4.220.0100.05312.33
5.4.210.0190.08212.33
5.4.200.0080.05712.33
5.4.190.0090.05312.33
5.4.180.0060.05412.33
5.4.170.0130.09112.34
5.4.160.0090.04912.34
5.4.150.0070.05012.33
5.4.140.0070.05312.01
5.4.130.0050.05112.00
5.4.120.0050.05311.96
5.4.110.0080.05111.96
5.4.100.0120.05911.96
5.4.90.0080.06511.95
5.4.80.0090.05511.96
5.4.70.0070.05711.95
5.4.60.0070.05611.95
5.4.50.0070.05611.95
5.4.40.0090.04911.94
5.4.30.0120.04811.94
5.4.20.0090.05011.94
5.4.10.0150.07611.94
5.4.00.0080.05111.43
5.3.290.0040.04012.80
5.3.280.0110.05312.71
5.3.270.0100.07812.72
5.3.260.0110.05112.72
5.3.250.0070.05212.71
5.3.240.0130.04912.72
5.3.230.0110.05112.70
5.3.220.0120.05012.68
5.3.210.0090.05112.68
5.3.200.0120.04612.68
5.3.190.0090.04612.68
5.3.180.0080.05312.67
5.3.170.0080.05712.67
5.3.160.0160.06912.67
5.3.150.0110.04712.68
5.3.140.0120.07212.66
5.3.130.0100.06012.66
5.3.120.0030.06212.66
5.3.110.0060.05612.66
5.3.100.0080.06812.12
5.3.90.0140.06312.08
5.3.80.0400.08612.08
5.3.70.0060.04212.07
5.3.60.0070.04812.06
5.3.50.0070.05712.00
5.3.40.0130.05312.00
5.3.30.0140.06811.95
5.3.20.0060.03911.73
5.3.10.0060.06011.70
5.3.00.0090.04011.69
5.2.170.0080.0299.19
5.2.160.0130.0679.19
5.2.150.0140.0769.18
5.2.140.0180.0709.18
5.2.130.0100.0499.15
5.2.120.0060.0519.14
5.2.110.0070.0479.16
5.2.100.0070.0509.15
5.2.90.0070.0489.16
5.2.80.0100.0729.14
5.2.70.0060.0519.14
5.2.60.0150.0609.09
5.2.50.0100.0469.06
5.2.40.0100.0419.04
5.2.30.0070.0609.02
5.2.20.0080.0679.02
5.2.10.0080.0508.91
5.2.00.0090.0598.78
5.1.60.0100.0358.06
5.1.50.0090.0348.06
5.1.40.0080.0358.04
5.1.30.0060.0498.39
5.1.20.0040.0428.41
5.1.10.0070.0358.13
5.1.00.0070.0378.13
5.0.50.0050.0296.62
5.0.40.0050.0286.47
5.0.30.0060.0416.29
5.0.20.0030.0286.25
5.0.10.0030.0376.23
5.0.00.0050.0336.23
4.4.90.0030.0194.78
4.4.80.0000.0194.75
4.4.70.0050.0254.75
4.4.60.0030.0194.75
4.4.50.0030.0174.77
4.4.40.0030.0274.71
4.4.30.0050.0154.76
4.4.20.0050.0144.85
4.4.10.0040.0154.85
4.4.00.0030.0284.76
4.3.110.0030.0204.67
4.3.100.0070.0134.66
4.3.90.0020.0174.63
4.3.80.0030.0264.58
4.3.70.0060.0154.63
4.3.60.0030.0174.63
4.3.50.0030.0164.63
4.3.40.0060.0234.54
4.3.30.0040.0163.29
4.3.20.0030.0163.26
4.3.10.0030.0173.22
4.3.00.0430.02710.55

preferences:
51.87 ms | 401 KiB | 5 Q