3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = "Text text #hashtag text text #hast/tag"; $hashtag_path = '/path/to'; $hashtags_url = '/#(\S+)/'; $body = preg_replace_callback( $hashtags_url, function($matches) use ($hashtag_path) { return "<a href=\"$hashtag_path/hashtag/".urlencode($matches[1])."\">".$matches[0]."</a>"; }, $body); echo $body;

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.0040.00516.90
8.5.00.0110.01020.32
8.4.160.0120.00923.82
8.4.150.0070.00616.97
8.4.140.0110.01017.85
8.4.130.0100.01018.03
8.4.120.0100.01122.48
8.4.110.0110.00922.48
8.4.100.0120.00918.03
8.4.90.0130.00818.58
8.4.80.0130.00618.86
8.4.70.0110.01018.33
8.4.60.0110.00818.94
8.4.50.0070.00617.88
8.4.40.0190.00019.70
8.4.30.0060.01520.50
8.4.20.0150.00717.89
8.4.10.0000.01019.66
8.3.280.0110.00918.61
8.3.270.0120.00716.75
8.3.260.0120.00616.64
8.3.250.0120.00718.81
8.3.240.0100.00817.20
8.3.230.0130.00716.73
8.3.220.0120.00718.90
8.3.210.0140.00618.42
8.3.200.0060.00316.86
8.3.190.0060.00217.06
8.3.180.0110.00716.64
8.3.170.0150.00317.11
8.3.160.0070.00316.73
8.3.150.0100.00620.93
8.3.140.0060.01216.78
8.3.130.0040.00418.77
8.3.120.0130.00319.04
8.3.110.0080.00018.40
8.3.100.0000.00816.91
8.3.90.0040.00426.77
8.3.80.0060.00318.31
8.3.70.0120.00316.58
8.3.60.0120.00616.63
8.3.50.0120.00616.44
8.3.40.0130.01018.96
8.3.30.0070.00718.98
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.290.0050.00420.62
8.2.280.0060.01318.43
8.2.270.0130.00617.14
8.2.260.0120.00318.80
8.2.250.0060.00616.96
8.2.240.0000.00917.39
8.2.230.0070.00420.94
8.2.220.0060.00337.54
8.2.210.0070.00726.77
8.2.200.0070.00318.54
8.2.190.0040.01518.53
8.2.180.0100.00725.92
8.2.170.0140.00719.12
8.2.160.0140.00022.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00721.25
8.2.110.0000.00922.38
8.2.100.0090.00917.91
8.2.90.0030.00517.88
8.2.80.0080.00018.89
8.2.70.0040.00417.80
8.2.60.0040.00418.14
8.2.50.0000.00818.10
8.2.40.0060.00321.06
8.2.30.0080.00019.36
8.2.20.0000.00718.19
8.2.10.0000.00719.24
8.2.00.0000.00719.39
8.1.330.0050.00422.14
8.1.320.0140.00716.19
8.1.310.0040.00416.62
8.1.300.0090.00018.63
8.1.290.0070.00330.84
8.1.280.0140.00725.92
8.1.270.0050.00223.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00319.25
8.1.230.0070.00417.83
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0100.00017.47
8.1.190.0000.00917.47
8.1.180.0000.00918.10
8.1.170.0050.00318.51
8.1.160.0000.00918.92
8.1.150.0060.00318.92
8.1.140.0000.00818.84
8.1.130.0060.00317.61
8.1.120.0000.01017.51
8.1.110.0030.00517.63
8.1.100.0000.00717.61
8.1.90.0000.00717.51
8.1.80.0030.00717.64
8.1.70.0000.00717.64
8.1.60.0030.00517.73
8.1.50.0060.00317.68
8.1.40.0000.00817.67
8.1.30.0000.00817.73
8.1.20.0040.00417.69
8.1.10.0000.00917.71
8.1.00.0040.00417.68
8.0.300.0000.00718.77
8.0.290.0060.00317.00
8.0.280.0070.00018.54
8.0.270.0030.00316.96
8.0.260.0000.00716.98
8.0.250.0000.00717.08
8.0.240.0070.00017.17
8.0.230.0050.00317.14
8.0.220.0030.00317.01
8.0.210.0070.00017.07
8.0.200.0000.00617.07
8.0.190.0000.00817.09
8.0.180.0090.00017.05
8.0.170.0030.00616.97
8.0.160.0040.00417.05
8.0.150.0080.00017.00
8.0.140.0000.01216.89
8.0.130.0060.00013.46
8.0.120.0040.00416.98
8.0.110.0000.00717.08
8.0.100.0000.00716.88
8.0.90.0000.00816.85
8.0.80.0080.01217.05
8.0.70.0020.00516.88
8.0.60.0050.00217.10
8.0.50.0070.00017.04
8.0.30.0080.00817.04
8.0.20.0080.00817.13
8.0.10.0080.00817.09
8.0.00.0030.01217.12
7.4.330.0020.00215.55
7.4.320.0040.00416.63
7.4.300.0000.00616.71
7.4.290.0070.00416.68
7.4.280.0080.00016.73
7.4.270.0000.00716.82
7.4.260.0030.00313.40
7.4.250.0040.00416.81
7.4.240.0040.00416.71
7.4.230.0000.00716.76
7.4.220.0000.00716.62
7.4.210.0060.01016.79
7.4.200.0000.00716.85
7.4.160.0090.00616.86
7.4.150.0060.00916.90
7.4.140.0080.00816.94
7.4.130.0060.00916.63
7.4.120.0110.00416.57
7.4.110.0110.01116.77
7.4.100.0090.00616.73
7.4.90.0110.01116.72
7.4.80.0060.01016.69
7.4.70.0100.00716.79
7.4.60.0130.01016.79
7.4.50.0110.01116.63
7.4.40.0120.00316.63
7.4.30.0150.00616.75
7.4.20.0120.00316.72
7.4.10.0100.01116.57
7.4.00.0080.00516.73
7.3.330.0000.00716.52
7.3.320.0050.00013.52
7.3.310.0030.00316.39
7.3.300.0000.00616.48
7.3.290.0050.01216.54
7.3.270.0130.00816.51
7.3.260.0080.00816.51
7.3.250.0190.00416.53
7.3.240.0090.00516.50
7.3.230.0080.00816.50
7.3.220.0030.01116.36
7.3.210.0070.00716.38
7.3.200.0110.00716.45
7.3.190.0130.00316.45
7.3.180.0130.00316.47
7.3.170.0060.00816.43
7.3.160.0090.00916.46
7.3.150.0030.01116.36
7.3.140.0060.01216.44
7.3.130.0130.00516.48
7.3.120.0070.00716.46
7.3.110.0100.00316.37
7.3.100.0070.00716.47
7.3.90.0040.01416.74
7.3.80.0000.01516.50
7.3.70.0140.00316.59
7.3.60.0100.00716.66
7.3.50.0040.00916.55
7.3.40.0090.00616.63
7.3.30.0140.00316.61
7.3.20.0090.00916.66
7.3.10.0070.00716.58
7.3.00.0040.01116.61

preferences:
34.58 ms | 403 KiB | 5 Q