3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "And so @Nick said to @Joe, hello!\n"; $contentWithMentions = $content; preg_match_all('/\s\@\w+/',$content,$matches); foreach ($matches[0] as $match) { $contentWithMentions = str_replace("$match", '<a href="user.php?user=#">'.$match.'</a>', $contentWithMentions); } echo $contentWithMentions; $contentWithMentions = preg_replace('/\s\@\w+/', '<a href="user.php?user=#">'."$0".'</a>', $content); echo $contentWithMentions;

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.0120.00619.37
8.5.20.0110.00719.52
8.5.10.0100.00721.18
8.5.00.0140.00820.34
8.4.180.0130.00919.93
8.4.170.0140.00820.33
8.4.160.0160.00523.95
8.4.150.0080.00416.94
8.4.140.0080.01317.80
8.4.130.0080.01318.14
8.4.120.0110.00920.79
8.4.110.0120.00818.77
8.4.100.0110.00617.90
8.4.90.0130.00820.50
8.4.80.0050.00417.96
8.4.70.0090.01017.95
8.4.60.0150.00619.14
8.4.50.0090.01124.58
8.4.40.0100.01019.65
8.4.30.0040.01220.63
8.4.20.0070.01420.42
8.4.10.0160.00319.84
8.3.300.0160.00320.88
8.3.290.0110.01118.44
8.3.280.0060.00116.28
8.3.270.0080.01216.61
8.3.260.0120.00716.82
8.3.250.0090.01019.12
8.3.240.0130.00616.86
8.3.230.0070.00516.57
8.3.220.0140.00519.19
8.3.210.0130.00618.59
8.3.200.0030.00516.75
8.3.190.0070.00717.30
8.3.180.0100.00518.34
8.3.170.0040.00417.27
8.3.160.0120.00618.65
8.3.150.0040.01420.64
8.3.140.0090.00016.53
8.3.130.0080.00816.63
8.3.120.0110.00419.09
8.3.110.0050.00316.82
8.3.100.0070.01016.63
8.3.90.0080.00016.90
8.3.80.0090.00016.76
8.3.70.0120.00316.63
8.3.60.0100.00718.68
8.3.50.0130.00217.75
8.3.40.0120.00618.88
8.3.30.0110.00318.93
8.3.20.0000.00820.76
8.3.10.0030.00521.70
8.3.00.0040.00420.69
8.2.300.0120.00818.25
8.2.290.0110.00820.58
8.2.280.0110.00818.50
8.2.270.0070.01017.07
8.2.260.0030.00520.31
8.2.250.0040.00417.11
8.2.240.0060.01018.60
8.2.230.0040.00420.94
8.2.220.0000.00824.06
8.2.210.0100.01026.77
8.2.200.0000.01116.50
8.2.190.0080.01517.00
8.2.180.0140.00718.43
8.2.170.0140.00422.96
8.2.160.0030.01021.10
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00326.16
8.2.110.0110.00022.33
8.2.100.0090.00318.03
8.2.90.0030.00519.21
8.2.80.0100.00017.97
8.2.70.0040.00417.88
8.2.60.0030.00518.16
8.2.50.0090.00018.07
8.2.40.0080.00019.95
8.2.30.0020.00518.14
8.2.20.0040.00418.18
8.2.10.0000.00819.08
8.2.00.0000.00819.30
8.1.340.0140.00623.46
8.1.330.0070.01221.98
8.1.320.0110.00816.70
8.1.310.0070.00716.81
8.1.300.0070.00416.61
8.1.290.0040.00418.88
8.1.280.0070.01025.92
8.1.270.0080.00020.64
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0110.00020.80
8.1.230.0100.00317.70
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0030.00718.78
8.1.160.0000.00718.90
8.1.150.0000.00818.89
8.1.140.0000.00818.83
8.1.130.0000.00720.07
8.1.120.0000.00717.49
8.1.110.0080.00017.57
8.1.100.0000.00817.57
8.1.90.0060.00317.46
8.1.80.0000.00817.59
8.1.70.0030.00317.48
8.1.60.0040.00417.76
8.1.50.0040.00417.64
8.1.40.0030.00617.55
8.1.30.0050.00317.69
8.1.20.0040.00417.80
8.1.10.0000.00717.72
8.1.00.0030.00617.64
8.0.300.0040.00420.00
8.0.290.0040.00416.85
8.0.280.0000.00718.52
8.0.270.0070.00317.26
8.0.260.0040.00420.09
8.0.250.0070.00017.07
8.0.240.0070.00017.07
8.0.230.0000.00717.06
8.0.220.0050.00317.11
8.0.210.0030.00317.05
8.0.200.0030.00317.02
8.0.190.0000.00717.05
8.0.180.0060.00317.00
8.0.170.0000.00816.95
8.0.160.0000.00717.11
8.0.150.0040.00416.96
8.0.140.0050.00216.95
8.0.130.0030.00313.39
8.0.120.0040.00416.92
8.0.110.0000.00717.00
8.0.100.0050.00216.89
8.0.90.0030.00617.14
8.0.80.0110.00417.11
8.0.70.0080.00016.92
8.0.60.0000.00817.05
8.0.50.0080.00017.02
8.0.30.0130.00317.11
8.0.20.0110.00916.99
8.0.10.0070.00016.95
8.0.00.0070.01116.94
7.4.330.0000.00415.55
7.4.320.0050.00216.72
7.4.300.0070.00016.70
7.4.290.0000.00816.70
7.4.280.0040.00416.61
7.4.270.0060.00316.64
7.4.260.0000.00613.47
7.4.250.0040.00416.81
7.4.240.0030.00516.72
7.4.230.0000.00716.87
7.4.220.0040.00316.79
7.4.210.0100.00816.84
7.4.200.0070.00016.83
7.4.130.0090.00916.85
7.4.120.0130.01116.68
7.4.110.0090.00916.89
7.4.100.0090.00916.80
7.4.90.0030.01416.74
7.4.80.0100.00719.39
7.4.70.0030.01316.77
7.4.60.0100.00716.66
7.4.50.0090.00516.54
7.4.40.0080.01616.76
7.4.00.0070.01015.01
7.3.330.0070.00016.56
7.3.320.0050.00013.19
7.3.310.0050.00316.31
7.3.300.0050.00316.46
7.3.290.0070.00016.51
7.3.280.0100.00616.48
7.3.260.0100.00816.66
7.3.240.0100.01016.63
7.3.230.0120.00916.43
7.3.210.0100.00616.87
7.3.200.0080.00816.36
7.3.190.0070.01016.45
7.3.180.0170.00016.55
7.3.170.0170.00616.92
7.3.160.0060.01016.57
7.3.120.0130.00615.28
7.3.110.0070.00715.17
7.3.100.0040.01014.95
7.3.90.0080.00414.97
7.3.80.0050.00614.99
7.3.70.0100.00514.96
7.3.60.0060.00514.93
7.3.50.0040.00715.02
7.3.40.0080.00714.86
7.3.30.0050.00814.91
7.3.20.0060.00715.77
7.3.10.0040.00815.88
7.3.00.0050.00715.92
7.2.330.0090.00916.79
7.2.320.0170.00016.88
7.2.310.0130.00616.63
7.2.300.0140.01116.75
7.2.290.0030.01316.98
7.2.250.0130.00315.32
7.2.240.0070.00915.29
7.2.230.0110.00315.24
7.2.220.0080.00415.17
7.2.210.0070.00715.38
7.2.200.0090.00715.13
7.2.190.0020.01215.39
7.2.180.0080.00315.00
7.2.170.0040.01115.16
7.2.160.0070.00715.23
7.2.150.0070.01015.03
7.2.140.0060.00815.28
7.2.130.0120.00315.09
7.2.120.0040.01115.10
7.2.110.0070.00915.24
7.2.100.0140.00315.45
7.2.90.0060.01015.54
7.2.80.0040.01115.08
7.2.70.0130.00315.43
7.2.60.0000.01415.51
7.2.50.0070.00715.27
7.2.40.0060.00915.41
7.2.30.0060.00915.22
7.2.20.0120.00315.27
7.2.10.0060.01015.25
7.2.00.0060.00915.38
7.1.330.0080.00715.05
7.1.320.0040.00815.13
7.1.310.0090.00115.32
7.1.300.0030.01114.97
7.1.290.0030.01015.25
7.1.280.0060.00914.77
7.1.270.0050.00714.99
7.1.260.0050.00514.91
7.1.250.0040.00914.38

preferences:
46.98 ms | 1527 KiB | 5 Q