3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sampleString = "<a href='{{url}}'>Link</a> <p>This text {{url}} will not get replaced</p> <a href='{{url}}' download='true'>Another Link</a>"; $regex = "/(?<=href=')()(?={{url}}.*>)/"; $replaced = preg_replace($regex, "https://myurl.com?redirect=\1", $sampleString); echo $replaced;

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.0110.00716.46
8.5.00.0140.00620.25
8.4.160.0170.00523.38
8.4.150.0030.00014.05
8.4.140.0130.00817.68
8.4.130.0060.00419.67
8.4.120.0120.00822.51
8.4.110.0140.00618.79
8.4.100.0140.00717.97
8.4.90.0120.00820.49
8.4.80.0070.01218.84
8.4.70.0120.00517.98
8.4.60.0070.01518.89
8.4.50.0120.00817.81
8.4.40.0040.01117.94
8.4.30.0130.00720.34
8.4.20.0120.00617.95
8.4.10.0140.00719.71
8.3.280.0110.00720.93
8.3.270.0120.00816.81
8.3.260.0060.00316.85
8.3.250.0090.01118.70
8.3.240.0100.01016.91
8.3.230.0130.00616.71
8.3.220.0100.00818.79
8.3.210.0100.00716.85
8.3.200.0020.00716.84
8.3.190.0100.00816.52
8.3.180.0120.00516.76
8.3.170.0100.00716.61
8.3.160.0070.01116.61
8.3.150.0040.00418.67
8.3.140.0030.00716.78
8.3.130.0080.00016.74
8.3.120.0090.00918.84
8.3.110.0060.01320.94
8.3.100.0090.00624.06
8.3.90.0070.00026.77
8.3.80.0030.00716.75
8.3.70.0040.01116.88
8.3.60.0150.00618.27
8.3.50.0150.00523.65
8.3.40.0100.00721.90
8.3.30.0070.00718.74
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0110.00916.58
8.2.280.0090.00618.66
8.2.270.0090.00617.11
8.2.260.0080.00818.46
8.2.250.0060.00316.83
8.2.240.0050.00517.32
8.2.230.0060.00322.58
8.2.220.0050.00337.54
8.2.210.0040.00426.77
8.2.200.0100.00016.37
8.2.190.0040.01816.75
8.2.180.0180.00425.92
8.2.170.0040.01119.08
8.2.160.0120.00322.96
8.2.150.0030.00525.66
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00421.07
8.2.110.0050.00520.47
8.2.100.0090.00317.96
8.2.90.0030.00617.75
8.2.80.0040.00419.04
8.2.70.0040.00417.63
8.2.60.0050.00317.91
8.2.50.0040.00418.07
8.2.40.0090.00020.13
8.2.30.0070.00017.96
8.2.20.0040.00418.07
8.2.10.0020.00519.34
8.2.00.0050.00319.32
8.1.330.0120.00816.12
8.1.320.0090.00916.23
8.1.310.0040.00418.47
8.1.300.0030.00518.06
8.1.290.0140.00018.88
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00023.82
8.1.230.0040.00822.28
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00517.13
8.1.180.0080.00018.10
8.1.170.0060.00318.64
8.1.160.0040.00418.79
8.1.150.0030.00318.77
8.1.140.0000.00820.64
8.1.130.0030.00317.55
8.1.120.0030.00517.58
8.1.110.0000.00817.47
8.1.100.0000.00717.48
8.1.90.0040.00417.59
8.1.80.0040.00417.54
8.1.70.0050.00317.48
8.1.60.0040.00417.63
8.1.50.0040.00417.52
8.1.40.0060.00317.59
8.1.30.0040.00417.73
8.1.20.0040.00417.70
8.1.10.0000.00917.52
8.1.00.0040.00417.46
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0030.00318.46
8.0.270.0030.00318.23
8.0.260.0000.00716.95
8.0.250.0000.00817.11
8.0.240.0040.00417.05
8.0.230.0030.00317.04
8.0.220.0000.00717.00
8.0.210.0000.00717.05
8.0.200.0040.00417.12
8.0.190.0050.00517.03
8.0.180.0070.00016.90
8.0.170.0040.00417.07
8.0.160.0040.00417.14
8.0.150.0060.00317.00
8.0.140.0000.00717.02
8.0.130.0000.00513.54
8.0.120.0000.00716.89
8.0.110.0000.00717.11
8.0.100.0040.00417.11
8.0.90.0050.00217.00
8.0.80.0050.01116.98
8.0.70.0000.00716.99
8.0.60.0000.00717.06
8.0.50.0040.00416.98
8.0.30.0100.00717.37
8.0.20.0160.00217.20
8.0.10.0030.00717.06
8.0.00.0150.00316.61
7.4.330.0000.00415.55
7.4.320.0000.00816.66
7.4.300.0050.00216.60
7.4.290.0040.00416.61
7.4.280.0030.00816.73
7.4.270.0040.00416.55
7.4.260.0050.00013.41
7.4.250.0070.00016.62
7.4.240.0000.00716.77
7.4.230.0040.00416.55
7.4.220.0020.00516.53
7.4.210.0040.01216.75
7.4.200.0070.00016.76
7.4.130.0090.00916.68
7.4.120.0130.00616.59
7.4.110.0090.01316.70
7.4.100.0030.01416.64
7.4.90.0060.01216.54
7.4.80.0100.00716.71
7.4.70.0120.00616.54
7.4.60.0120.00616.55
7.4.50.0080.00916.70
7.4.40.0080.00816.69
7.4.30.0170.00616.51
7.4.20.0130.01016.61
7.4.10.0070.01016.61
7.4.00.0070.01016.44
7.3.330.0000.01016.30
7.3.320.0060.00013.25
7.3.310.0000.00816.38
7.3.300.0080.00016.42
7.3.290.0080.01016.49
7.3.260.0090.01516.43
7.3.240.0060.01616.69
7.3.230.0100.00616.38
7.3.220.0130.00316.72
7.3.210.0070.01116.70
7.3.200.0080.00816.25
7.3.190.0100.00716.73
7.3.180.0100.00616.61
7.3.170.0070.01016.52
7.3.160.0080.01116.69
7.3.150.0090.01316.51
7.3.140.0090.00916.48
7.3.130.0140.00716.68
7.3.120.0100.00916.54
7.3.110.0060.01316.39
7.3.100.0060.01216.72
7.3.90.0090.00816.42
7.3.80.0140.00316.36
7.3.70.0030.01616.44
7.3.60.0120.00916.53
7.3.50.0090.00816.54
7.3.40.0070.01116.48
7.3.30.0110.01216.43
7.3.20.0060.01216.41
7.3.10.0110.00916.52
7.3.00.0160.01316.36
7.2.340.0120.00616.68
7.2.330.0040.01416.70
7.2.320.0070.01016.77
7.2.310.0120.00616.74
7.2.300.0160.00316.84
7.2.290.0230.00016.60
7.2.280.0130.01016.66
7.2.270.0060.01216.88
7.2.260.0030.01416.74
7.2.250.0140.01116.60
7.2.240.0090.00916.68
7.2.230.0120.00616.88
7.2.220.0040.01416.74
7.2.210.0090.00916.87
7.2.200.0150.00716.62
7.2.190.0170.00016.66
7.2.180.0070.01016.58
7.2.170.0120.00616.69
7.2.160.0090.00916.72
7.2.150.0150.00716.88
7.2.140.0120.00816.67
7.2.130.0100.01016.70
7.2.120.0110.01116.80
7.2.110.0090.01516.79
7.2.100.0070.01716.81
7.2.90.0170.00916.84
7.2.80.0160.00816.77
7.2.70.0130.01116.72
7.2.60.0140.01116.83
7.2.50.0150.00916.79
7.2.40.0190.00916.83
7.2.30.0180.00816.72
7.2.20.0070.01816.77
7.2.10.0150.01116.69
7.2.00.0210.00516.73

preferences:
38.07 ms | 403 KiB | 5 Q