3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "This is a #hastag within some #awesometext."; function tagIt($body) { $string = $body; $htag = "#"; $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=$arr[$i]'>".$arr[$i]."</a>"; } $i++; } $string = implode(" ", $arr); echo "\n".$string."\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.0140.00718.28
8.3.50.0070.01122.09
8.3.40.0100.01018.88
8.3.30.0070.00719.27
8.3.20.0070.00020.30
8.3.10.0030.00521.97
8.3.00.0090.00022.34
8.2.180.0130.00916.88
8.2.170.0110.00322.96
8.2.160.0110.00422.21
8.2.150.0000.00824.18
8.2.140.0150.00024.66
8.2.130.0000.00726.16
8.2.120.0080.00017.63
8.2.110.0050.00522.25
8.2.100.0080.00419.88
8.2.90.0040.00419.39
8.2.80.0080.00019.66
8.2.70.0030.00517.88
8.2.60.0030.00618.16
8.2.50.0030.00518.07
8.2.40.0040.00418.22
8.2.30.0080.00018.25
8.2.20.0020.00517.96
8.2.10.0000.00817.87
8.2.00.0000.00718.03
8.1.280.0120.00325.92
8.1.270.0040.00422.14
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0090.00023.83
8.1.230.0070.00419.16
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00717.50
8.1.190.0050.00317.66
8.1.180.0000.00818.10
8.1.170.0040.00418.74
8.1.160.0040.00422.10
8.1.150.0000.00818.81
8.1.140.0040.00417.66
8.1.130.0070.00017.83
8.1.120.0040.00417.63
8.1.110.0060.00317.59
8.1.100.0040.00417.51
8.1.90.0050.00217.63
8.1.80.0000.00717.62
8.1.70.0040.00417.61
8.1.60.0040.00417.65
8.1.50.0060.00317.71
8.1.40.0020.00517.69
8.1.30.0030.00617.70
8.1.20.0050.00317.74
8.1.10.0040.00417.75
8.1.00.0000.00717.75
8.0.300.0040.00418.77
8.0.290.0080.00017.16
8.0.280.0000.00718.49
8.0.270.0070.00017.33
8.0.260.0040.00416.97
8.0.250.0040.00417.09
8.0.240.0070.00017.06
8.0.230.0050.00317.03
8.0.220.0000.00717.07
8.0.210.0040.00417.04
8.0.200.0000.00717.07
8.0.190.0050.00317.01
8.0.180.0000.00717.12
8.0.170.0070.00017.09
8.0.160.0000.00817.03
8.0.150.0070.00016.99
8.0.140.0000.00716.93
8.0.130.0050.00013.56
8.0.120.0040.00416.92
8.0.110.0000.00817.11
8.0.100.0000.00717.12
8.0.90.0040.00417.07
8.0.80.0110.00717.02
8.0.70.0070.00017.00
8.0.60.0040.00417.05
8.0.50.0020.00517.09
8.0.30.0150.00717.40
8.0.20.0090.01017.40
8.0.10.0040.00417.01
8.0.00.0070.01016.86
7.4.330.0000.00615.00
7.4.320.0030.00316.76
7.4.300.0070.00016.84
7.4.290.0030.00316.84
7.4.280.0040.00416.88
7.4.270.0080.00016.75
7.4.260.0030.00316.62
7.4.250.0040.00416.71
7.4.240.0040.00416.81
7.4.230.0070.00016.74
7.4.220.0100.00716.70
7.4.210.0080.00816.72
7.4.200.0070.00016.87
7.4.190.0030.00616.70
7.4.160.0120.01216.76
7.4.150.0070.01017.40
7.4.140.0100.00917.86
7.4.130.0130.00816.85
7.4.120.0110.00716.87
7.4.110.0060.01116.80
7.4.100.0070.01016.91
7.4.90.0170.00316.62
7.4.80.0030.01319.39
7.4.70.0100.00616.58
7.4.60.0130.00316.69
7.4.50.0040.00416.69
7.4.40.0030.01322.77
7.4.30.0060.01216.70
7.4.00.0150.00015.03
7.3.330.0000.00713.39
7.3.320.0000.00513.46
7.3.310.0060.00016.49
7.3.300.0030.00316.54
7.3.290.0090.00616.52
7.3.280.0110.00916.51
7.3.270.0060.01217.40
7.3.260.0090.00916.75
7.3.250.0090.00916.78
7.3.240.0110.00516.70
7.3.230.0120.01216.48
7.3.210.0140.00316.63
7.3.200.0100.00716.62
7.3.190.0090.01316.55
7.3.180.0060.00916.38
7.3.170.0060.01816.94
7.3.160.0130.01016.56
7.3.120.0030.00715.32
7.3.10.0160.00716.52
7.3.00.0180.00716.65
7.2.330.0070.01016.91
7.2.320.0100.00716.82
7.2.310.0060.00916.89
7.2.300.0080.00916.76
7.2.290.0070.01016.73
7.2.130.0110.00616.52
7.2.120.0140.00316.91
7.2.110.0110.00816.96
7.2.100.0060.01116.93
7.2.90.0120.00616.86
7.2.80.0080.00816.75
7.2.70.0070.01116.91
7.2.60.0130.00316.88
7.2.50.0100.00616.89
7.2.40.0080.00816.95
7.2.30.0120.00517.04
7.2.20.0100.00616.97
7.2.10.0130.00317.09
7.2.00.0080.00817.16
7.1.250.0100.01015.54
7.1.240.0070.00716.07
7.1.230.0060.00615.90
7.1.220.0000.01215.70
7.1.210.0090.00616.16
7.1.200.0030.01015.86
7.1.190.0030.01016.00
7.1.180.0090.00415.86
7.1.170.0100.00316.15
7.1.160.0060.00616.17
7.1.150.0000.01216.00
7.1.140.0000.01115.97
7.1.130.0070.00716.16
7.1.120.0080.00815.97
7.1.110.0070.00715.95
7.1.100.0070.01016.06
7.1.90.0040.00816.16
7.1.80.0060.00916.16
7.1.70.0020.01216.90
7.1.60.0050.01317.87
7.1.50.0050.01416.42
7.1.40.0030.01016.04
7.1.30.0100.00315.75
7.1.20.0060.00615.66
7.1.10.0030.00615.83
7.1.00.0050.04019.21
7.0.320.0040.01115.64
7.0.310.0050.00515.56
7.0.300.0040.01215.63
7.0.290.0000.01615.79
7.0.280.0000.01615.66
7.0.270.0030.00715.33
7.0.260.0000.01515.68
7.0.250.0070.00715.73
7.0.240.0040.00415.55
7.0.230.0030.00715.45
7.0.220.0050.00315.39
7.0.210.0060.00715.65
7.0.200.0090.00616.27
7.0.190.0040.01115.55
7.0.180.0000.01415.73
7.0.170.0000.01315.75
7.0.160.0090.00315.58
7.0.150.0030.00715.63
7.0.140.0020.04318.83
7.0.130.0030.00915.51
7.0.120.0000.01515.85
7.0.110.0030.01015.74
7.0.100.0100.02217.77
7.0.90.0040.02917.71
7.0.80.0100.02817.85
7.0.70.0070.02317.83
7.0.60.0050.03717.87
7.0.50.0050.04518.00
7.0.40.0120.04216.87
7.0.30.0070.04216.99
7.0.20.0070.03017.02
7.0.10.0140.04016.72
7.0.00.0070.04116.86
5.6.380.0040.00814.51
5.6.370.0070.01014.55
5.6.360.0080.00614.80
5.6.350.0060.00314.43
5.6.340.0060.00314.71
5.6.330.0080.00814.48
5.6.320.0100.00014.42
5.6.310.0040.00714.23
5.6.300.0030.00614.50
5.6.290.0040.00814.80
5.6.280.0020.04417.71
5.6.270.0070.00714.52
5.6.260.0000.01314.76
5.6.250.0020.03717.46
5.6.240.0090.02217.41
5.6.230.0060.02417.48
5.6.220.0140.03017.57
5.6.210.0040.02517.59
5.6.200.0040.02417.72
5.6.190.0050.04717.83
5.6.180.0040.04517.71
5.6.170.0070.04317.77
5.6.160.0030.05217.78
5.6.150.0050.04417.71
5.6.140.0080.04517.77
5.6.130.0050.02917.77
5.6.120.0050.04117.77
5.6.110.0020.02717.70
5.6.100.0110.04117.89
5.6.90.0070.04117.61
5.6.80.0050.04317.49
5.6.70.0060.04117.43
5.6.60.0110.03717.36
5.6.50.0080.04217.29
5.6.40.0130.03817.47
5.6.30.0080.04017.52
5.6.20.0100.03817.53
5.6.10.0050.03317.40
5.6.00.0110.03817.34
5.5.380.0030.02315.96
5.5.370.0050.02215.95
5.5.360.0060.02015.95
5.5.350.0060.02515.93
5.5.340.0020.03716.13
5.5.330.0090.03816.03
5.5.320.0070.03716.17
5.5.310.0130.03616.01
5.5.300.0070.04316.03
5.5.290.0030.04416.18
5.5.280.0050.03716.01
5.5.270.0050.04216.08
5.5.260.0030.04316.25
5.5.250.0100.03815.97
5.5.240.0050.03015.76
5.5.230.0070.04015.62
5.5.220.0060.02615.83
5.5.210.0050.04015.67
5.5.200.0070.04215.66
5.5.190.0040.03915.74
5.5.180.0080.04115.86
5.5.170.0080.00414.21
5.5.160.0080.03915.75
5.5.150.0060.03815.81
5.5.140.0110.03515.69
5.5.130.0070.03515.72
5.5.120.0060.04315.81
5.5.110.0050.04415.83
5.5.100.0080.03715.59
5.5.90.0030.04115.80
5.5.80.0050.04315.63
5.5.70.0020.04515.60
5.5.60.0080.02815.73
5.5.50.0080.02315.71
5.5.40.0050.04015.55
5.5.30.0070.04115.77
5.5.20.0080.03815.73
5.5.10.0060.04115.79
5.5.00.0050.04215.76
5.4.450.0070.04315.41
5.4.440.0100.03515.46
5.4.430.0070.04315.29
5.4.420.0020.04515.29
5.4.410.0050.04315.22
5.4.400.0050.04315.42
5.4.390.0110.04015.25
5.4.380.0050.04214.96
5.4.370.0080.04015.17
5.4.360.0070.02515.19
5.4.350.0080.04015.31
5.4.340.0070.04515.22
5.4.330.0040.00411.24
5.4.320.0090.03714.96
5.4.310.0090.03615.07
5.4.300.0110.03415.11
5.4.290.0050.04215.12
5.4.280.0040.02615.29
5.4.270.0090.03515.25
5.4.260.0050.04315.23
5.4.250.0080.04015.16
5.4.240.0090.03515.22
5.4.230.0060.03515.06
5.4.220.0050.04115.03
5.4.210.0090.03815.13
5.4.200.0120.03415.12
5.4.190.0090.03715.19
5.4.180.0080.03315.18
5.4.170.0070.04015.24
5.4.160.0000.03215.16
5.4.150.0060.03815.02
5.4.140.0080.03213.85
5.4.130.0040.02513.77
5.4.120.0060.03813.86
5.4.110.0080.03613.82
5.4.100.0080.01813.92
5.4.90.0130.02013.71
5.4.80.0020.04213.92
5.4.70.0100.03513.90
5.4.60.0090.03613.94
5.4.50.0070.03913.83
5.4.40.0060.03113.74
5.4.30.0030.03613.83
5.4.20.0030.04213.86
5.4.10.0020.03613.77
5.4.00.0050.03513.45
5.3.290.0130.03412.86
5.3.280.0100.03812.85
5.3.270.0160.03312.83
5.3.260.0110.03712.84
5.3.250.0040.04112.89
5.3.240.0110.03612.83
5.3.230.0090.03712.84
5.3.220.0070.03812.85
5.3.210.0080.03912.88
5.3.200.0080.03912.86
5.3.190.0120.03512.84
5.3.180.0060.03312.89
5.3.170.0080.03512.83
5.3.160.0080.03512.80
5.3.150.0100.02012.86
5.3.140.0080.04112.87
5.3.130.0090.03312.82
5.3.120.0070.04212.80
5.3.110.0100.03812.84
5.3.100.0070.03812.58
5.3.90.0090.03812.60
5.3.80.0060.04312.49
5.3.70.0070.04212.55
5.3.60.0090.03612.53
5.3.50.0100.02512.47
5.3.40.0020.04612.50
5.3.30.0080.03712.50
5.3.20.0080.03612.41
5.3.10.0130.03012.39
5.3.00.0090.03212.35
5.2.170.0030.03611.14
5.2.160.0080.03211.07
5.2.150.0120.02711.14
5.2.140.0080.02911.12
5.2.130.0040.03311.10
5.2.120.0050.02311.05
5.2.110.0100.03011.02
5.2.100.0030.02311.10
5.2.90.0040.03111.15
5.2.80.0080.02011.05
5.2.70.0090.03211.04
5.2.60.0030.03711.12
5.2.50.0080.03311.06
5.2.40.0020.03211.08
5.2.30.0030.03511.05
5.2.20.0090.03010.98
5.2.10.0050.03511.02
5.2.00.0070.03010.89
5.1.60.0120.01010.87
5.1.50.0060.03010.87
5.1.40.0030.02110.87
5.1.30.0060.03110.87
5.1.20.0050.03210.87
5.1.10.0050.03010.87
5.1.00.0030.02710.87
5.0.50.0030.02610.87
5.0.40.0090.01710.87
5.0.30.0050.03310.87
5.0.20.0000.02310.87
5.0.10.0060.02310.87
5.0.00.0000.03810.87
4.4.90.0030.02010.87
4.4.80.0030.01410.87
4.4.70.0060.01310.87
4.4.60.0010.01610.87
4.4.50.0020.02310.87
4.4.40.0010.02810.87
4.4.30.0030.01810.87
4.4.20.0040.01910.87
4.4.10.0030.01510.87
4.4.00.0040.02910.87
4.3.110.0040.01810.87
4.3.100.0070.01410.87
4.3.90.0030.01810.87
4.3.80.0020.03210.87
4.3.70.0020.01910.87
4.3.60.0050.01710.87
4.3.50.0020.01710.87
4.3.40.0000.03110.87
4.3.30.0020.02010.87
4.3.20.0030.02110.87
4.3.10.0040.01010.87
4.3.00.0000.01110.87

preferences:
49.72 ms | 400 KiB | 5 Q