3v4l.org

run code in 500+ PHP versions simultaneously
<?php $regex = '/(foo)?(bar)?(baz)?/'; $regex = preg_replace('~.[a-z\s]*$~i', '|(?<phpstanNamedCaptureGroupLast>)$0', $regex); var_dump(preg_match($regex, '', $matches, PREG_UNMATCHED_AS_NULL)); var_dump($matches); var_dump(preg_match($regex, '', $matches)); 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.5.30.0070.01019.61
8.5.20.0110.00719.90
8.5.10.0100.00816.79
8.5.00.0130.01019.84
8.4.180.0140.00819.87
8.4.170.0140.00725.70
8.4.160.0130.01023.98
8.4.150.0070.00516.86
8.4.140.0090.01217.92
8.4.130.0120.00817.71
8.4.120.0140.00620.93
8.4.110.0160.00518.91
8.4.100.0150.00517.61
8.4.90.0150.00617.71
8.4.80.0130.00718.00
8.4.70.0140.00817.95
8.4.60.0150.00618.61
8.4.50.0100.01118.91
8.4.40.0100.01017.88
8.4.30.0160.00018.55
8.4.20.0000.00919.44
8.4.10.0040.00419.71
8.3.300.0110.00920.93
8.3.290.0120.00821.00
8.3.280.0150.00518.37
8.3.270.0110.00816.39
8.3.260.0100.00916.84
8.3.250.0110.00718.80
8.3.240.0130.00316.47
8.3.230.0100.01116.29
8.3.220.0120.00617.13
8.3.210.0090.00516.68
8.3.200.0050.00416.60
8.3.190.0070.00818.92
8.3.180.0120.00716.57
8.3.170.0150.00318.76
8.3.160.0100.01016.85
8.3.150.0070.01116.91
8.3.140.0040.00420.62
8.3.130.0030.00618.36
8.3.120.0000.00920.53
8.3.110.0040.00418.44
8.3.100.0030.00616.75
8.3.90.0040.00418.55
8.3.80.0230.01130.84
8.3.70.0420.00530.84
8.3.60.0410.01130.84
8.3.50.0130.00830.84
8.3.40.0330.00530.84
8.3.30.0280.00230.84
8.3.20.0230.01430.84
8.3.10.0290.00930.84
8.3.00.0290.00530.84
8.2.300.0090.01223.88
8.2.290.0120.00720.41
8.2.280.0060.00418.37
8.2.270.0120.00616.91
8.2.260.0140.00417.35
8.2.250.0000.01416.97
8.2.240.0060.01318.78
8.2.230.0060.00320.94
8.2.220.0120.00324.06
8.2.210.0080.00026.77
8.2.200.0320.00430.84
8.2.190.0180.01430.84
8.2.180.0220.00930.84
8.2.170.0270.00630.84
8.2.160.0240.00630.84
8.2.150.0310.01130.84
8.2.140.0310.00530.84
8.2.130.0270.00830.84
8.2.120.0270.00730.84
8.2.110.0270.00430.84
8.2.100.0250.00530.84
8.2.90.0370.00430.84
8.2.80.0260.01130.84
8.2.70.0320.01230.84
8.2.60.0390.00330.84
8.2.50.0360.00430.84
8.2.40.0320.00630.84
8.2.30.0300.01230.84
8.2.20.0280.01130.84
8.2.10.0300.01030.84
8.2.00.0270.00730.84
8.1.340.0120.00719.56
8.1.330.0150.00416.85
8.1.320.0180.01016.11
8.1.310.0040.00416.66
8.1.300.0090.00019.76
8.1.290.0300.00530.84
8.1.280.0310.00830.84
8.1.270.0320.00930.84
8.1.260.0300.01030.84
8.1.250.0290.00930.84
8.1.240.0240.00230.84
8.1.230.0270.00230.84
8.1.220.0270.01030.84
8.1.210.0340.00530.84
8.1.200.0360.00230.84
8.1.190.0300.00430.84
8.1.180.0370.00630.84
8.1.170.0380.00130.84
8.1.160.0270.01230.84
8.1.150.0280.00930.84
8.1.140.0320.00830.84
8.1.130.0290.00930.84
8.1.120.0360.00330.84
8.1.110.0240.01130.84
8.1.100.0340.00330.84
8.1.90.0270.00730.84
8.1.80.0280.00530.84
8.1.70.0220.00930.84
8.1.60.0320.00530.84
8.1.50.0350.00430.84
8.1.40.0350.00830.84
8.1.30.0390.00130.84
8.1.20.0210.01230.84
8.1.10.0310.00730.84
8.1.00.0230.00730.84

preferences:
74.73 ms | 995 KiB | 5 Q