3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "/([a-zA-Z0-9+._-]+)@([a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/"; $template = '<a email-a="%s" email-b="%s">[click to email]</a>'; $str = "bla bla bla firstbit@secondbit.com bla bla bla"; $newStr = preg_replace_callback($pattern, function($matches) use ($template) { [, $local, $host] = $matches; return sprintf($template, $local, $host); }, $str); echo $newStr;

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.120.0110.00923.91
8.4.110.0130.00818.94
8.4.100.0030.00518.74
8.4.90.0110.00920.79
8.4.80.0060.00320.75
8.4.70.0070.00317.95
8.4.60.0110.01018.86
8.4.50.0130.00819.62
8.4.40.0160.00317.79
8.4.30.0280.00319.17
8.4.20.0310.00317.77
8.4.10.0270.00618.54
8.3.250.0110.00818.88
8.3.240.0060.01317.28
8.3.230.0100.01016.78
8.3.220.0110.00918.73
8.3.210.0120.00516.80
8.3.200.0060.00316.86
8.3.190.0090.01017.21
8.3.180.0110.00816.85
8.3.170.0110.00719.10
8.3.160.0250.00817.38
8.3.150.0180.01218.77
8.3.140.0270.00517.58
8.3.130.0210.00417.30
8.3.120.0220.00317.78
8.3.110.0200.00818.83
8.3.100.0150.01116.72
8.3.90.0250.00721.65
8.3.80.0210.00816.70
8.3.70.0210.01116.70
8.3.60.0220.00816.55
8.3.50.0220.00416.60
8.3.40.0210.00618.26
8.3.30.0180.00718.12
8.3.20.0150.00820.88
8.3.10.0150.00721.13
8.3.00.0080.00921.88
8.2.290.0090.01020.44
8.2.280.0080.00818.50
8.2.270.0210.00516.99
8.2.260.0180.00617.66
8.2.250.0130.00717.70
8.2.240.0230.00617.68
8.2.230.0140.01019.60
8.2.220.0170.00620.45
8.2.210.0180.00921.62
8.2.200.0180.00617.54
8.2.190.0210.00916.86
8.2.180.0190.00921.29
8.2.170.0200.00318.47
8.2.160.0180.00720.30
8.2.150.0210.00321.64
8.2.140.0170.00821.05
8.2.130.0140.01021.88
8.2.120.0150.01019.44
8.2.110.0180.00219.09
8.2.100.0120.01117.89
8.2.90.0110.00617.72
8.2.80.0130.00418.22
8.2.70.0190.00317.77
8.2.60.0150.00517.81
8.2.50.0190.00417.63
8.2.40.0170.00518.80
8.2.30.0140.00917.87
8.2.20.0190.00417.87
8.2.10.0170.00518.50
8.2.00.0100.01118.46
8.1.330.0090.00922.30
8.1.320.0090.01016.15
8.1.310.0200.00816.56
8.1.300.0190.00418.06
8.1.290.0160.01023.54
8.1.280.0250.00320.99
8.1.270.0180.00720.58
8.1.260.0150.00721.96
8.1.250.0140.00822.79
8.1.240.0130.01020.76
8.1.230.0150.00919.13
8.1.220.0200.00317.60
8.1.210.0130.00618.14
8.1.200.0130.00717.49
8.1.190.0150.00617.34
8.1.180.0170.00517.66
8.1.170.0210.00018.08
8.1.160.0120.01018.06
8.1.150.0140.00718.05
8.1.140.0180.00317.95
8.1.130.0160.00818.63
8.1.120.0160.00817.47
8.1.110.0140.00817.41
8.1.100.0140.00717.54
8.1.90.0150.00617.54
8.1.80.0130.00917.46
8.1.70.0200.00017.49
8.1.60.0150.00617.65
8.1.50.0150.00717.58
8.1.40.0110.01017.57
8.1.30.0160.00517.70
8.1.20.0150.00617.69
8.1.10.0140.00717.58
8.1.00.0130.00717.50
8.0.300.0150.00617.64
8.0.290.0170.00516.77
8.0.280.0180.00317.59
8.0.270.0140.01117.34
8.0.260.0190.00318.58
8.0.250.0190.00516.86
8.0.240.0200.00216.83
8.0.230.0150.00516.95
8.0.220.0150.00216.85
8.0.210.0120.00716.90
8.0.200.0090.00416.79
8.0.190.0130.00416.84
8.0.180.0130.00516.99
8.0.170.0070.00616.75
8.0.160.0140.00216.83
8.0.150.0100.00216.90
8.0.140.0100.00316.67
8.0.130.0100.00214.98
8.0.120.0110.00816.70
8.0.110.0080.00716.84
8.0.100.0060.00716.79
8.0.90.0070.00516.80
8.0.80.0130.00616.88
8.0.70.0140.00416.71
8.0.60.0130.00416.70
8.0.50.0150.00616.75
8.0.30.0210.00616.85
8.0.20.0150.00716.93
8.0.10.0110.00717.11
8.0.00.0110.01117.06
7.4.330.0090.00316.04
7.4.320.0090.00216.62
7.4.300.0080.00416.62
7.4.290.0080.00316.44
7.4.280.0090.00616.51
7.4.270.0110.00016.59
7.4.260.0120.00415.06
7.4.250.0100.00516.47
7.4.240.0080.00516.63
7.4.230.0060.00616.61
7.4.220.0080.00616.68
7.4.210.0120.00716.58
7.4.200.0170.00616.58
7.4.190.0250.00016.60
7.4.180.0210.00516.39
7.4.160.0150.00816.60
7.4.150.0120.00916.75
7.4.140.0160.00916.54
7.4.130.0140.01116.54
7.4.120.0190.00616.53
7.4.110.0210.00916.61
7.4.100.0140.01516.62
7.4.90.0150.00916.54
7.4.80.0120.00816.52
7.4.70.0100.00716.60
7.4.60.0080.00816.61
7.4.50.0120.00816.57
7.4.40.0100.01016.62
7.4.30.0110.00816.60
7.4.20.0110.00716.56
7.4.10.0130.00816.48
7.4.00.0150.00616.61
7.3.330.0120.00716.45
7.3.320.0150.00314.73
7.3.310.0130.00716.31
7.3.300.0120.00616.33
7.3.290.0080.01016.49
7.3.280.0240.00816.21
7.3.270.0130.01216.48
7.3.260.0140.00416.52
7.3.250.0200.00616.43
7.3.240.0180.00716.46
7.3.230.0170.01316.40
7.3.220.0160.01016.40
7.3.210.0190.00716.42
7.3.200.0190.00816.40
7.3.190.0180.00516.44
7.3.180.0170.00616.45
7.3.170.0180.00616.35
7.3.160.0160.00716.45
7.3.150.0210.00316.33
7.3.140.0230.00716.43
7.3.130.0210.00916.34
7.3.120.0180.00916.34
7.3.110.0230.00516.39
7.3.100.0150.01016.37
7.3.90.0250.00616.57
7.3.80.0180.00816.44
7.3.70.0210.01016.35
7.3.60.0150.01216.50
7.3.50.0190.01116.44
7.3.40.0180.01016.47
7.3.30.0240.00216.42
7.3.20.0200.01117.10
7.3.10.0200.00617.05
7.3.00.0250.01017.06
7.2.340.0230.01116.38
7.2.330.0230.00916.38
7.2.320.0220.00916.41
7.2.310.0250.00916.49
7.2.300.0230.00916.45
7.2.290.0190.01216.37
7.2.280.0210.01316.45
7.2.270.0210.01216.57
7.2.260.0240.00516.48
7.2.250.0160.00616.42
7.2.240.0240.00716.45
7.2.230.0260.00816.51
7.2.220.0200.01016.58
7.2.210.0250.00716.61
7.2.200.0230.01016.68
7.2.190.0260.01016.57
7.2.180.0210.01116.65
7.2.170.0230.00816.68
7.2.160.0180.01316.70
7.2.150.0300.00617.51
7.2.140.0190.01317.72
7.2.130.0240.00817.85
7.2.120.0320.00417.71
7.2.110.0220.01117.58
7.2.100.0260.00717.48
7.2.90.0280.00617.57
7.2.80.0190.01317.67
7.2.70.0220.00817.65
7.2.60.0290.00517.66
7.2.50.0290.00517.50
7.2.40.0210.00917.67
7.2.30.0230.00917.70
7.2.20.0230.01017.61
7.2.10.0210.00917.57
7.2.00.0210.00917.71
7.1.330.0240.00516.64
7.1.320.0240.00616.46
7.1.310.0180.01016.48
7.1.300.0200.00916.40
7.1.290.0220.00716.44
7.1.280.0220.00816.38
7.1.270.0280.00616.35
7.1.260.0270.00616.34
7.1.250.0180.01316.38
7.1.240.0230.00716.26
7.1.230.0230.00516.41
7.1.220.0240.00616.46
7.1.210.0280.00616.37
7.1.200.0190.01116.40
7.1.190.0190.01116.43
7.1.180.0260.00316.39
7.1.170.0210.00716.24
7.1.160.0180.00916.39
7.1.150.0140.01316.39
7.1.140.0290.00916.29
7.1.130.0190.00816.47
7.1.120.0250.00616.47
7.1.110.0160.01416.40
7.1.100.0250.00316.55
7.1.90.0170.01016.37
7.1.80.0160.00916.52
7.1.70.0460.00816.31
7.1.60.0220.00516.62
7.1.50.0220.00516.40
7.1.40.0200.00716.55
7.1.30.0220.00716.54
7.1.20.0220.00816.57
7.1.10.0270.00316.46
7.1.00.0230.00516.41
7.0.330.0210.00615.70
7.0.320.0240.00515.66
7.0.310.0190.00915.72
7.0.300.0180.00615.87
7.0.290.0180.01015.71
7.0.280.0270.00215.64
7.0.270.0230.00615.75
7.0.260.0210.00515.64
7.0.250.0220.00615.78
7.0.240.0180.00915.86
7.0.230.0210.00515.86
7.0.220.0170.01015.75
7.0.210.0170.01015.67
7.0.200.0170.01015.72
7.0.190.0160.00515.83
7.0.180.0220.00815.64
7.0.170.0170.00815.82
7.0.160.0210.00315.65
7.0.150.0180.00815.93
7.0.140.0200.00615.83
7.0.130.0190.00815.93
7.0.120.0210.00615.79
7.0.110.0170.00915.66
7.0.100.0220.00615.73
7.0.90.0240.00815.84
7.0.80.0210.00815.74
7.0.70.0180.00715.61
7.0.60.0210.00415.75
7.0.50.0180.00615.68
7.0.40.0230.00315.82
7.0.30.0180.01015.99
7.0.20.0240.00315.63
7.0.10.0210.00815.86
7.0.00.0160.01115.81
5.6.400.0230.00415.57
5.6.390.0160.01415.63
5.6.380.0260.01115.64
5.6.370.0150.01515.61
5.6.360.0180.00815.69
5.6.350.0230.00715.57
5.6.340.0190.00915.57
5.6.330.0180.00915.60
5.6.320.0180.01215.69
5.6.310.0230.00615.65
5.6.300.0210.00615.58
5.6.290.0150.01415.69
5.6.280.0190.00915.61
5.6.270.0180.01015.64
5.6.260.0230.00715.72
5.6.250.0180.01215.69
5.6.240.0210.00415.66
5.6.230.0220.00715.65
5.6.220.0150.01215.63
5.6.210.0190.00915.59
5.6.200.0140.01215.80
5.6.190.0150.01615.71
5.6.180.0220.00615.70
5.6.170.0160.01115.70
5.6.160.0210.00815.75
5.6.150.0150.01515.66
5.6.140.0220.00715.72
5.6.130.0210.00715.65
5.6.120.0240.00515.63
5.6.110.0240.00415.63
5.6.100.0240.00415.64
5.6.90.0220.00915.62
5.6.80.0170.01015.58
5.6.70.0300.00615.63
5.6.60.0210.00615.72
5.6.50.0190.01015.69
5.6.40.0200.00615.71
5.6.30.0160.00715.57
5.6.20.0140.00715.53
5.6.10.0240.00615.55
5.6.00.0190.00915.66
5.5.380.0210.00815.67
5.5.370.0160.01315.71
5.5.360.0160.01415.55
5.5.350.0170.01015.54
5.5.340.0190.00815.54
5.5.330.0140.01315.58
5.5.320.0190.00715.61
5.5.310.0200.00815.59
5.5.300.0240.00815.64
5.5.290.0230.00615.49
5.5.280.0200.00715.58
5.5.270.0200.00815.56
5.5.260.0210.00515.58
5.5.250.0210.00915.63
5.5.240.0190.01315.60
5.5.230.0250.00315.67
5.5.220.0180.00715.62
5.5.210.0210.00615.62
5.5.200.0230.00515.51
5.5.190.0190.00915.53
5.5.180.0170.01015.53
5.5.170.0170.01215.52
5.5.160.0230.00915.62
5.5.150.0190.00715.49
5.5.140.0150.01215.46
5.5.130.0180.01115.45
5.5.120.0240.00615.45
5.5.110.0250.00315.47
5.5.100.0210.00615.57
5.5.90.0190.00815.59
5.5.80.0180.01115.59
5.5.70.0170.01115.61
5.5.60.0170.01315.58
5.5.50.0220.00815.56
5.5.40.0130.01215.67
5.5.30.0170.00815.57
5.5.20.0230.00815.59
5.5.10.0190.00915.59
5.5.00.0210.00915.58
5.4.450.0140.00815.22
5.4.440.0130.00915.22
5.4.430.0150.00815.22
5.4.420.0130.00715.22
5.4.410.0130.00915.22
5.4.400.0180.00415.22
5.4.390.0150.00815.22
5.4.380.0140.00815.22
5.4.370.0200.00415.22
5.4.360.0130.00815.22
5.4.350.0130.00315.22
5.4.340.0150.00815.22
5.4.330.0150.00815.22
5.4.320.0210.00615.22
5.4.310.0180.00315.22
5.4.300.0190.00415.22
5.4.290.0170.00615.22
5.4.280.0170.00515.22
5.4.270.0130.00915.22
5.4.260.0170.00515.22
5.4.250.0140.00515.22
5.4.240.0160.00615.22
5.4.230.0210.00815.22
5.4.220.0180.00615.22
5.4.210.0160.00715.22
5.4.200.0200.00415.22
5.4.190.0190.00415.22
5.4.180.0110.00915.22
5.4.170.0180.00515.22
5.4.160.0160.00715.22
5.4.150.0120.00815.22
5.4.140.0190.00215.22
5.4.130.0170.00715.22
5.4.120.0160.00615.22
5.4.110.0160.00415.22
5.4.100.0150.00615.22
5.4.90.0190.00315.22
5.4.80.0100.00815.22
5.4.70.0120.00415.22
5.4.60.0140.00815.22
5.4.50.0120.00815.22
5.4.40.0120.00915.22
5.4.30.0160.00315.22
5.4.20.0160.00515.22
5.4.10.0120.00815.22
5.4.00.0140.00715.22
5.3.290.0150.00815.22
5.3.280.0150.00915.22
5.3.270.0220.00615.22
5.3.260.0130.01015.22
5.3.250.0140.00915.22
5.3.240.0170.00515.22
5.3.230.0160.00715.22
5.3.220.0120.00915.22
5.3.210.0130.01015.22
5.3.200.0140.00915.22
5.3.190.0140.01215.22
5.3.180.0210.00415.22
5.3.170.0170.00515.22
5.3.160.0100.01215.22
5.3.150.0190.00515.22
5.3.140.0200.00315.22
5.3.130.0140.00815.22
5.3.120.0180.00515.22
5.3.110.0140.00815.22
5.3.100.0140.00915.22
5.3.90.0160.00615.22
5.3.80.0130.00815.22
5.3.70.0120.00815.22
5.3.60.0180.00315.22
5.3.50.0200.00115.22
5.3.40.0140.00915.22
5.3.30.0160.00715.22
5.3.20.0140.00615.22
5.3.10.0130.00815.22
5.3.00.0170.00515.22
5.2.170.0150.00415.22
5.2.160.0140.00415.22
5.2.150.0120.00715.22
5.2.140.0140.00615.22
5.2.130.0150.00515.22
5.2.120.0120.00615.22
5.2.110.0080.00915.22
5.2.100.0150.00215.22
5.2.90.0140.00415.22
5.2.80.0140.00415.22
5.2.70.0140.00615.22
5.2.60.0110.01015.22
5.2.50.0140.00715.22
5.2.40.0140.00615.22
5.2.30.0120.00415.22
5.2.20.0140.00415.22
5.2.10.0110.00815.22
5.2.00.0110.00815.22
5.1.60.0140.00315.22
5.1.50.0110.00615.22
5.1.40.0120.00515.22
5.1.30.0080.00915.22
5.1.20.0130.00415.22
5.1.10.0130.00515.22
5.1.00.0100.00615.22
5.0.50.0110.00415.22
5.0.40.0100.00615.22
5.0.30.0090.00515.22
5.0.20.0080.00615.22
5.0.10.0060.00815.22
5.0.00.0070.00815.22
4.4.90.0050.00415.22
4.4.80.0000.00815.22
4.4.70.0020.00515.22
4.4.60.0040.00515.22
4.4.50.0070.00215.22
4.4.40.0050.00315.22
4.4.30.0060.00215.22
4.4.20.0070.00215.22
4.4.10.0100.00015.22
4.4.00.0020.00615.22
4.3.110.0060.00315.22
4.3.100.0080.00215.22
4.3.90.0080.00215.22
4.3.80.0070.00115.22
4.3.70.0070.00115.22
4.3.60.0100.00015.22
4.3.50.0080.00015.22
4.3.40.0080.00015.22
4.3.30.0060.00215.22
4.3.20.0070.00015.22
4.3.10.0070.00115.22
4.3.00.0060.00015.22

preferences:
124.75 ms | 403 KiB | 5 Q