3v4l.org

run code in 300+ PHP versions simultaneously
<?php // can be anything, even always false regex $regex = '~(?<=t)(?<=f)x()(?<named>y)~u'; // add one capturing group to the end so all capture group keys // are present in the $matches $regex = preg_replace('~^(.)(.*)\K(\1\w*$)~', '|()$3', $regex); var_dump($regex); preg_match($regex, '', $matches); 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.4.20.0070.01018.04
8.4.10.0000.00923.99
8.3.140.0030.00617.01
8.3.130.0040.00418.73
8.3.120.0040.00419.18
8.3.110.0000.01520.94
8.3.100.0080.00024.06
8.3.90.0150.00326.77
8.3.80.0250.00324.40
8.3.70.0220.00723.79
8.3.60.0230.00824.63
8.3.50.0120.00723.89
8.3.40.0210.00825.63
8.3.30.0200.00825.50
8.3.20.0180.00727.51
8.3.10.0150.00627.75
8.3.00.0170.00428.50
8.2.260.0000.00816.77
8.2.250.0090.00916.96
8.2.240.0040.00417.41
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0030.00526.77
8.2.200.0150.00823.86
8.2.190.0170.00623.72
8.2.180.0190.00924.63
8.2.170.0170.00724.95
8.2.160.0240.00326.90
8.2.150.0200.00528.25
8.2.140.0140.00827.75
8.2.130.0210.00528.50
8.2.120.0220.00326.61
8.2.110.0260.00625.98
8.2.100.0150.01224.44
8.2.90.0150.01124.56
8.2.80.0170.00724.98
8.2.70.0170.00825.16
8.2.60.0150.01025.21
8.2.50.0180.00725.15
8.2.40.0190.00425.28
8.2.30.0160.00925.16
8.2.20.0250.00325.16
8.2.10.0170.01025.28
8.2.00.0150.00825.20
8.1.310.0080.00018.56
8.1.300.0100.00618.28
8.1.290.0180.00730.84
8.1.280.0080.01128.38
8.1.270.0130.00027.75
8.1.260.0100.00428.59
8.1.250.0080.00529.46
8.1.240.0080.00627.41
8.1.230.0090.00626.75
8.1.220.0080.00524.29
8.1.210.0150.00625.38
8.1.200.0150.00624.92
8.1.190.0190.00524.99
8.1.180.0170.00824.98
8.1.170.0160.00724.92
8.1.160.0180.00624.98
8.1.150.0190.00525.04
8.1.140.0140.01024.92
8.1.130.0220.00225.04
8.1.120.0140.00724.98
8.1.110.0180.01025.05
8.1.100.0130.00925.05
8.1.90.0180.00225.04
8.1.80.0140.00624.98
8.1.70.0150.00525.05
8.1.60.0180.00725.04
8.1.50.0170.00625.04
8.1.40.0280.00225.09
8.1.30.0210.01025.04
8.1.20.0120.01325.06
8.1.10.0170.00825.11
8.1.00.0190.00624.98
8.0.300.0160.00625.47
8.0.290.0150.00424.73
8.0.280.0170.00624.79
8.0.270.0120.00824.79
8.0.260.0140.00924.79
8.0.250.0150.00424.70
8.0.240.0150.00824.85
8.0.230.0110.01224.72
8.0.220.0180.00624.73
8.0.210.0180.00524.79
8.0.200.0120.00724.62
8.0.190.0100.00624.79
8.0.180.0170.00724.73
8.0.170.0180.00524.77
8.0.160.0180.00824.79
8.0.150.0190.00424.79
8.0.140.0160.00724.79
8.0.130.0180.00724.79
8.0.120.0190.00424.79
8.0.110.0170.00424.79
8.0.100.0200.00324.72
8.0.90.0210.00624.72
8.0.80.0190.00624.79
8.0.70.0220.00524.79
8.0.60.0130.00524.79
8.0.50.0200.00224.73
8.0.30.0110.01124.79
8.0.20.0140.00924.77
8.0.10.0190.00624.79
8.0.00.0140.00630.84
7.4.330.0200.00330.84
7.4.320.0160.00030.84
7.4.300.0150.00530.84
7.4.290.0230.00430.84
7.4.280.0160.00030.84
7.4.270.0170.00030.84
7.4.260.0140.00230.84
7.4.250.0110.01130.84
7.4.240.0080.00830.84
7.4.230.0100.00530.84
7.4.220.0300.00330.84
7.4.210.0240.00730.84
7.4.200.0210.01030.84
7.4.190.0390.00830.84
7.4.180.0310.00830.84
7.4.160.0290.00730.84
7.4.150.0280.00330.84
7.4.140.0150.00830.84
7.4.130.0240.00030.84
7.4.120.0250.00930.84
7.4.110.0130.00830.84
7.4.100.0240.00430.84
7.4.90.0160.00030.84
7.4.80.0250.01430.84
7.4.70.0230.01130.84
7.4.60.0390.00330.84
7.4.50.0240.01030.84
7.4.40.0270.00830.84
7.4.30.0300.00330.84
7.4.20.0240.00330.84
7.4.10.0270.00830.84
7.4.00.0310.00330.84
7.3.330.0280.00630.84
7.3.320.0200.00930.84
7.3.310.0260.00630.84
7.3.300.0240.00730.84
7.3.290.0250.00630.84
7.3.280.0190.00830.84
7.3.270.0240.00830.84
7.3.260.0300.00630.84
7.3.250.0270.00330.84
7.3.240.0210.01430.84
7.3.230.0160.01630.84
7.3.220.0250.00930.84
7.3.210.0260.00930.84
7.3.200.0330.00330.84
7.3.190.0210.01830.84
7.3.180.0220.01230.84
7.3.170.0310.00330.84
7.3.160.0310.00430.84
7.3.150.0210.01030.84
7.3.140.0210.01130.84
7.3.130.0330.00730.84
7.3.120.0230.00630.84
7.3.110.0200.00030.84
7.3.100.0180.00430.84
7.3.90.0260.01030.84
7.3.80.0220.00930.84
7.3.70.0190.00330.84
7.3.60.0290.00430.84
7.3.50.0190.01530.84
7.3.40.0330.00030.84
7.3.30.0260.00730.84
7.3.20.0310.00030.84
7.3.10.0190.01730.84
7.3.00.0330.00730.84
7.2.340.0290.00030.84
7.2.330.0200.01030.84
7.2.320.0250.00930.84
7.2.310.0230.01030.84
7.2.300.0240.00930.84
7.2.290.0230.01030.84
7.2.280.0330.00930.84
7.2.270.0300.00330.84
7.2.260.0150.01530.84
7.2.250.0280.00630.84
7.2.240.0280.00030.84
7.2.230.0230.01030.84
7.2.220.0250.00930.84
7.2.210.0240.01030.84
7.2.200.0280.00630.84
7.2.190.0260.00730.84
7.2.180.0330.00030.84
7.2.170.0170.01330.84
7.2.160.0210.01330.84
7.2.150.0380.00630.84
7.2.140.0270.00930.84
7.2.130.0250.00730.84
7.2.120.0250.00630.84
7.2.110.0240.01430.84
7.2.100.0360.00330.84
7.2.90.0300.00830.84
7.2.80.0150.01230.84
7.2.70.0260.00030.84
7.2.60.0230.00530.84
7.2.50.0300.00330.84
7.2.40.0260.00730.84
7.2.30.0200.01330.84
7.2.20.0330.00030.84
7.2.10.0280.00630.84
7.2.00.0240.00930.84
7.1.330.0300.00030.84
7.1.320.0260.00330.84
7.1.310.0260.00330.84
7.1.300.0200.01030.84
7.1.290.0150.01530.84
7.1.280.0270.00330.84
7.1.270.0130.01730.84
7.1.260.0350.00830.84
7.1.250.0270.01230.84
7.1.240.0290.00430.84
7.1.230.0190.01230.84
7.1.220.0230.00730.84
7.1.210.0240.00630.84
7.1.200.0250.00730.84
7.1.190.0220.01130.84
7.1.180.0200.00830.84
7.1.170.0160.00830.84
7.1.160.0220.00230.84
7.1.150.0280.00630.84
7.1.140.0370.00430.84
7.1.130.0310.00030.84
7.1.120.0160.00930.84
7.1.110.0200.01230.84
7.1.100.0240.00630.84
7.1.90.0270.00330.84
7.1.80.0300.00030.84
7.1.70.0230.00830.84
7.1.60.0230.00730.84
7.1.50.0230.00730.84
7.1.40.0200.01030.84
7.1.30.0150.01530.84
7.1.20.0290.00330.84
7.1.10.0250.00430.84
7.1.00.0230.00630.84
7.0.330.0230.00730.84
7.0.320.0270.00430.84
7.0.310.0260.00630.84
7.0.300.0250.00830.84
7.0.290.0230.00730.84
7.0.280.0320.00030.84
7.0.270.0240.00730.84
7.0.260.0230.00330.84
7.0.250.0120.01230.84
7.0.240.0250.00330.84
7.0.230.0270.00330.84
7.0.220.0150.01030.84
7.0.210.0040.00930.84
7.0.200.0140.00030.84
7.0.190.0240.00330.84
7.0.180.0230.00330.84
7.0.170.0170.00030.84
7.0.160.0240.00030.84
7.0.150.0160.00330.84
7.0.140.0180.00630.84
7.0.130.0090.00530.84
7.0.120.0220.00730.84
7.0.110.0180.01230.84
7.0.100.0190.01130.84
7.0.90.0200.00930.84
7.0.80.0170.01130.84
7.0.70.0200.00730.84
7.0.60.0210.00730.84
7.0.50.0240.00730.84
7.0.40.0170.00730.84
7.0.30.0230.00030.84
7.0.20.0050.00930.84
7.0.10.0120.00430.84
7.0.00.0120.00530.84
5.6.400.0150.00030.84
5.6.390.0130.00230.84
5.6.380.0150.00030.84
5.6.370.0150.00030.84
5.6.360.0120.00330.84
5.6.350.0140.00330.84
5.6.340.0110.00630.84
5.6.330.0120.00630.84
5.6.320.0130.00330.84
5.6.310.0130.00530.84
5.6.300.0130.00330.84
5.6.290.0090.00630.84
5.6.280.0100.00530.84
5.6.270.0150.00030.84
5.6.260.0090.00630.84
5.6.250.0080.00630.84
5.6.240.0160.00430.84
5.6.230.0080.00830.84
5.6.220.0000.01530.84
5.6.210.0140.00330.84
5.6.200.0130.00330.84
5.6.190.0000.01530.84
5.6.180.0120.00330.84
5.6.170.0160.00030.84
5.6.160.0050.01030.84
5.6.150.0150.00030.84
5.6.140.0140.00330.84
5.6.130.0190.00030.84
5.6.120.0130.00430.84
5.6.110.0060.00930.84
5.6.100.0050.01030.84
5.6.90.0170.00030.84
5.6.80.0120.00430.84
5.6.70.0080.00830.84
5.6.60.0150.00030.84
5.6.50.0120.00430.84
5.6.40.0080.00830.84
5.6.30.0100.00530.84
5.6.20.0100.00330.84
5.6.10.0140.00030.84
5.6.00.0070.00730.84
5.5.380.0120.00430.84
5.5.370.0130.00330.84
5.5.360.0110.00430.84
5.5.350.0110.00630.84
5.5.340.0110.00430.84
5.5.330.0160.00230.84
5.5.320.0150.00030.84
5.5.310.0090.00630.84
5.5.300.0120.00330.84
5.5.290.0070.00730.84
5.5.280.0110.00430.84
5.5.270.0100.00530.84
5.5.260.0140.00330.84
5.5.250.0120.00230.84
5.5.240.0100.00530.84
5.5.230.0150.00030.84
5.5.220.0130.00330.84
5.5.210.0070.00730.84
5.5.200.0110.00330.84
5.5.190.0120.00330.84
5.5.180.0110.00430.84
5.5.170.0000.01430.84
5.5.160.0100.00530.84
5.5.150.0120.00330.84
5.5.140.0170.00030.84
5.5.130.0170.00030.84
5.5.120.0120.00430.84
5.5.110.0160.00030.84
5.5.100.0130.00330.84
5.5.90.0140.00330.84
5.5.80.0090.00630.84
5.5.70.0050.01030.84
5.5.60.0160.00030.84
5.5.50.0090.00530.84
5.5.40.0070.00730.84
5.5.30.0150.00030.84
5.5.20.0150.00030.84
5.5.10.0130.00030.84
5.5.00.0110.00330.84
5.4.450.0070.00430.84
5.4.440.0040.00730.84
5.4.430.0090.00330.84
5.4.420.0070.00430.84
5.4.410.0090.00430.84
5.4.400.0040.00930.84
5.4.390.0160.00030.84
5.4.380.0110.00330.84
5.4.370.0140.00030.84
5.4.360.0130.00030.84
5.4.350.0110.00030.84
5.4.340.0090.00330.84
5.4.330.0100.00030.84
5.4.320.0100.00230.84
5.4.310.0100.00030.84
5.4.300.0140.00030.84
5.4.290.0000.01230.84
5.4.280.0070.00430.84
5.4.270.0110.00030.84
5.4.260.0040.00830.84
5.4.250.0090.00430.84
5.4.240.0090.00430.84
5.4.230.0090.00630.84
5.4.220.0080.00530.84
5.4.210.0110.00030.84
5.4.200.0090.00330.84
5.4.190.0110.00030.84
5.4.180.0110.00030.84
5.4.170.0100.00230.84
5.4.160.0120.00030.84
5.4.150.0000.01130.84
5.4.140.0110.00030.84
5.4.130.0110.00430.84
5.4.120.0080.00330.84
5.4.110.0000.01030.84
5.4.100.0080.00430.84
5.4.90.0120.00030.84
5.4.80.0080.00430.84
5.4.70.0120.00030.84
5.4.60.0090.00230.84
5.4.50.0060.00630.84
5.4.40.0120.00330.84
5.4.30.0060.00630.84
5.4.20.0100.00330.84
5.4.10.0080.00430.84
5.4.00.0130.00030.84
5.3.290.0100.00330.84
5.3.280.0080.00430.84
5.3.270.0070.00530.84
5.3.260.0080.00430.84
5.3.250.0110.00030.84
5.3.240.0080.00430.84
5.3.230.0110.00030.84
5.3.220.0080.00330.84
5.3.210.0090.00230.84
5.3.200.0070.00330.84
5.3.190.0060.00630.84
5.3.180.0130.00330.84
5.3.170.0130.00030.84
5.3.160.0000.01130.84
5.3.150.0110.00030.84
5.3.140.0080.00430.84
5.3.130.0060.00630.84
5.3.120.0120.00030.84
5.3.110.0120.00030.84
5.3.100.0070.00430.84
5.3.90.0130.00330.84
5.3.80.0110.00330.84
5.3.70.0130.00030.84
5.3.60.0120.00030.84
5.3.50.0090.00330.84
5.3.40.0000.01130.84
5.3.30.0050.00530.84
5.3.20.0080.00330.84
5.3.10.0000.01030.84
5.3.00.0080.00230.84
5.2.170.0090.00030.84
5.2.160.0000.00930.84
5.2.150.0070.00230.84
5.2.140.0080.00030.84
5.2.130.0090.00030.84
5.2.120.0080.00030.84
5.2.110.0090.00030.84
5.2.100.0080.00030.84
5.2.90.0090.00030.84
5.2.80.0060.00630.84
5.2.70.0070.00230.84
5.2.60.0000.01030.84
5.2.50.0000.00930.84
5.2.40.0090.00030.84
5.2.30.0040.00430.84
5.2.20.0070.00230.84
5.2.10.0050.00530.84
5.2.00.0090.00030.84
5.1.60.0050.00330.84
5.1.50.0050.00530.84
5.1.40.0040.00430.84
5.1.30.0040.00430.84
5.1.20.0040.00430.84
5.1.10.0050.00330.84
5.1.00.0060.00230.84
5.0.50.0070.00030.84
5.0.40.0070.00030.84
5.0.30.0060.00030.84
5.0.20.0060.00030.84
5.0.10.0000.00630.84
5.0.00.0040.00430.84
4.4.90.0040.00030.84
4.4.80.0030.00030.84
4.4.70.0020.00230.84
4.4.60.0040.00030.84
4.4.50.0040.00030.84
4.4.40.0040.00030.84
4.4.30.0040.00030.84
4.4.20.0000.00330.84
4.4.10.0040.00030.84
4.4.00.0040.00030.84
4.3.110.0030.00030.84
4.3.100.0000.00430.84
4.3.90.0040.00030.84
4.3.80.0030.00030.84
4.3.70.0040.00030.84
4.3.60.0040.00030.84
4.3.50.0030.00030.84
4.3.40.0000.00430.84
4.3.30.0030.00030.84
4.3.20.0000.00330.84
4.3.10.0030.00030.84
4.3.00.0000.00430.84

preferences:
39.16 ms | 403 KiB | 5 Q