3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "This is a #hashtag within some #awesometext."; function tagIt($body) { $string = $body; $htag = "#"; $newstring = preg_replace("/#(\w+)/", "<a href='category.php?tag=$1'>#$1</a>", $string); //$arr = preg_split("/\s|\./", $string);print_r($arr); /*$arrc = count($arr); $i = 0; while($i < $arrc) { if(substr($arr[$i], 0, 1) === $htag) { $arr[$i] = "<a href = 'category.php?tag=".substr($arr[$i], 1)."'>".$arr[$i]."</a>"; } $i++; } $string = implode(" ", $arr);*/ echo "\n".$newstring."\n"; } tagIt($text);

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.3.60.0030.01018.68
8.3.50.0080.00722.03
8.3.40.0070.00718.68
8.3.30.0080.00519.01
8.3.20.0070.00020.36
8.3.10.0040.00421.88
8.3.00.0090.00022.18
8.2.180.0070.01016.63
8.2.170.0100.00322.96
8.2.160.0110.00420.46
8.2.150.0050.00324.18
8.2.140.0120.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.48
8.2.110.0060.00322.29
8.2.100.0040.00819.82
8.2.90.0000.00819.22
8.2.80.0000.00819.88
8.2.70.0060.00317.50
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0030.00618.03
8.2.30.0040.00417.97
8.2.20.0000.00717.86
8.2.10.0040.00417.82
8.2.00.0040.00417.73
8.1.280.0070.00725.92
8.1.270.0040.00422.18
8.1.260.0060.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.89
8.1.230.0090.00319.14
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0050.00517.48
8.1.190.0000.00717.54
8.1.180.0030.00618.10
8.1.170.0080.00018.77
8.1.160.0000.00821.99
8.1.150.0030.00618.78
8.1.140.0000.00717.54
8.1.130.0000.00817.72
8.1.120.0000.00717.63
8.1.110.0040.00417.50
8.1.100.0070.00017.47
8.1.90.0040.00417.58
8.1.80.0050.00217.56
8.1.70.0030.00317.61
8.1.60.0060.00317.62
8.1.50.0020.00517.65
8.1.40.0050.00217.54
8.1.30.0040.00417.80
8.1.20.0000.00817.81
8.1.10.0040.00417.50
8.1.00.0080.00017.45
8.0.300.0070.00018.77
8.0.290.0080.00017.28
8.0.280.0000.00718.33
8.0.270.0000.00717.26
8.0.260.0030.00316.90
8.0.250.0050.00217.12
8.0.240.0080.00017.09
8.0.230.0000.00717.13
8.0.220.0030.00316.93
8.0.210.0030.00317.03
8.0.200.0040.00417.05
8.0.190.0040.00416.95
8.0.180.0030.00516.98
8.0.170.0000.00717.09
8.0.160.0040.00417.00
8.0.150.0040.00416.87
8.0.140.0050.00217.03
8.0.130.0000.00613.45
8.0.120.0000.00717.03
8.0.110.0000.00817.02
8.0.100.0050.00216.98
8.0.90.0040.00417.00
8.0.80.0060.00916.97
8.0.70.0000.00717.06
8.0.60.0040.00416.83
8.0.50.0040.00416.96
8.0.30.0150.00817.29
8.0.20.0100.01017.40
8.0.10.0040.00417.07
8.0.00.0070.01316.91
7.4.330.0030.00315.08
7.4.320.0000.00616.79
7.4.300.0070.00016.79
7.4.290.0040.00416.75
7.4.280.0030.00616.80
7.4.270.0040.00416.70
7.4.260.0070.00016.71
7.4.250.0080.00016.76
7.4.240.0040.00416.70
7.4.230.0070.00016.69
7.4.220.0060.01016.75
7.4.210.0080.00916.82
7.4.200.0070.00016.60
7.4.190.0050.00216.99
7.4.160.0120.00816.82
7.4.150.0100.01017.40
7.4.140.0090.01117.86
7.4.130.0130.01116.66
7.4.120.0070.01116.71
7.4.110.0170.00016.80
7.4.100.0140.00716.73
7.4.90.0090.00916.76
7.4.80.0110.00619.39
7.4.70.0070.01016.51
7.4.60.0110.00516.59
7.4.50.0060.00316.78
7.4.40.0000.01622.77
7.4.30.0070.01016.84
7.4.00.0090.00615.09
7.3.330.0070.00013.29
7.3.320.0050.00013.53
7.3.310.0060.00316.49
7.3.300.0070.00016.52
7.3.290.0120.00916.50
7.3.280.0080.00916.52
7.3.270.0140.00417.40
7.3.260.0130.00616.79
7.3.250.0120.00816.64
7.3.240.0100.01316.69
7.3.230.0130.01016.48
7.3.210.0100.00716.53
7.3.200.0140.02019.39
7.3.190.0100.01316.57
7.3.180.0100.00716.81
7.3.170.0070.01016.53
7.3.160.0100.00716.85
7.3.120.0030.01015.02
7.2.330.0110.00616.75
7.2.320.0090.01316.93
7.2.310.0060.00916.62
7.2.300.0120.00616.89
7.2.290.0070.01016.88
7.2.00.0030.01019.26
7.1.200.0030.01016.02
7.1.100.0030.01018.29
7.1.70.0030.00617.22
7.1.60.0030.00917.43
7.1.50.0070.01816.98
7.1.00.0100.07022.38
7.0.200.0040.00816.86
7.0.140.0070.07021.93
7.0.60.0030.08319.95
7.0.50.0070.05717.88
7.0.40.0100.08720.13
7.0.30.0500.06720.35
7.0.20.0400.06020.20
7.0.10.0070.07720.21
7.0.00.0100.04020.24
5.6.280.0130.06320.90
5.6.210.0100.04020.70
5.6.200.0100.08318.16
5.6.190.0070.09020.60
5.6.180.3930.05720.63
5.6.170.0170.04720.47
5.6.160.0100.06020.49
5.6.150.0070.04718.28
5.6.140.0030.05018.28
5.6.130.0000.06718.23
5.6.120.0000.09321.14
5.6.110.0100.06721.10
5.6.100.0100.04720.89
5.6.90.0070.09021.13
5.6.80.0030.07020.41
5.6.70.4170.04020.53
5.5.350.0230.08020.50
5.5.340.0070.07317.96
5.5.330.0130.07720.22
5.5.320.3270.03720.35
5.5.310.0270.03020.30
5.5.300.0000.06717.92
5.5.290.0000.05718.10
5.5.280.0170.07320.86
5.5.270.0030.04320.86
5.5.260.0070.09020.87
5.5.250.0100.07720.59
5.5.240.0200.07720.15
5.4.450.0200.05019.30
5.4.440.0130.05719.16
5.4.430.0300.03319.39
5.4.420.0070.06319.51
5.4.410.0170.04719.32
5.4.400.0130.05018.51
5.4.390.0100.06318.63
5.4.380.0300.04718.70
5.4.370.0230.04318.69
5.4.360.0170.04718.80
5.4.350.0170.05018.77
5.4.340.0100.05718.77
5.4.320.0070.04312.51
5.4.310.0050.03812.50
5.4.300.0090.03912.50
5.4.290.0090.04012.50
5.4.280.0130.02712.39
5.4.270.0070.05319.01
5.4.260.0030.05718.84
5.4.250.0130.07318.95
5.4.240.0130.05019.14
5.4.230.0100.06318.86
5.4.220.0200.04319.14
5.4.210.0100.05319.14
5.4.200.0070.07318.98
5.4.190.0100.05019.00
5.4.180.0200.04318.91
5.4.170.0130.04718.94
5.4.160.0130.05019.13
5.4.150.0030.06319.01
5.4.140.0130.07016.71
5.4.130.0070.04716.39
5.4.120.0070.05016.54
5.4.110.0070.05016.68
5.4.100.0130.06316.43
5.4.90.0030.05316.52
5.4.80.0100.04716.62
5.4.70.0030.06016.68
5.4.60.0030.06316.63
5.4.50.0100.04716.61
5.4.40.0100.05016.49
5.4.30.0000.05716.39
5.4.20.0070.04716.54
5.4.10.0030.08016.62
5.4.00.0130.06015.99
5.3.290.0040.04012.80
5.3.280.0200.05014.71
5.3.270.0070.06014.82
5.3.260.0030.05714.72
5.3.250.0130.04714.79
5.3.240.0070.05014.88
5.3.230.0030.05714.87
5.3.220.0100.06714.55
5.3.210.0000.06014.56
5.3.200.0130.04314.56
5.3.190.0070.05714.79
5.3.180.0070.06014.55
5.3.170.0070.05014.52
5.3.160.0070.07014.73
5.3.150.0170.07014.85
5.3.140.0070.05014.84
5.3.130.0130.05314.81
5.3.120.0130.06314.42
5.3.110.0100.06714.60
5.3.100.0070.07014.25
5.3.90.0030.05714.01
5.3.80.0000.05714.23
5.3.70.0100.06314.32
5.3.60.0070.06714.07
5.3.50.0100.05014.15
5.3.40.0200.04714.23
5.3.30.0030.05013.97
5.3.20.0100.04714.00
5.3.10.0130.04713.85
5.3.00.0100.07313.93
5.2.170.0170.03711.38
5.2.160.0000.06311.45
5.2.150.0070.04011.45
5.2.140.0030.04711.19
5.2.130.0030.04311.30
5.2.120.0170.05311.29
5.2.110.0000.04711.09
5.2.100.0100.03711.28
5.2.90.0000.05011.27
5.2.80.0100.04011.27
5.2.70.0030.04711.37
5.2.60.0070.04011.34
5.2.50.0100.05011.30
5.2.40.0000.06711.22
5.2.30.0070.04011.02
5.2.20.0070.05311.23
5.2.10.0070.04710.75
5.2.00.0030.04310.99
5.1.60.0000.04710.18
5.1.50.0130.02710.20
5.1.40.0070.03710.27
5.1.30.0030.04010.61
5.1.20.0030.03710.35
5.1.10.0000.04310.32
5.1.00.0030.0379.96
5.0.50.0030.0308.62
5.0.40.0100.0278.40
5.0.30.0000.0508.52
5.0.20.0100.0238.18
5.0.10.0130.0338.47
5.0.00.0000.0478.24
4.4.90.0030.0307.52
4.4.80.0030.0337.52
4.4.70.0000.0277.52
4.4.60.0000.0277.52
4.4.50.0030.0337.52
4.4.40.0000.0477.52
4.4.30.0070.0207.52
4.4.20.0130.0237.52
4.4.10.0030.0277.52
4.4.00.0000.0377.52
4.3.110.0030.0237.52
4.3.100.0030.0207.52
4.3.90.0030.0237.52
4.3.80.0030.0377.52
4.3.70.0170.0177.52
4.3.60.0070.0207.52
4.3.50.0000.0277.52
4.3.40.0030.0307.52
4.3.30.0030.0237.52
4.3.20.0000.0237.52
4.3.10.0070.0277.52
4.3.00.0030.0206.72

preferences:
41.54 ms | 401 KiB | 5 Q