3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Chat { public static function linkifyMessage($message) { $threadUrl = "http://forum.freewar.de/viewtopic.php?"; $threadPattern = "@".preg_quote($threadUrl)."f=(\d+)&t=(\d+)((&p=(\d+)(#p(\d+))?)|&view=unread(#unread)?)?@i"; preg_match_all($threadPattern, $message, $matches, PREG_SET_ORDER); foreach($matches as $match) { $message = str_replace($match[0], "<a href='{$match[0]}' target='_blank'>{$match[0]}</a>", $message); } return $message; } } $start = microtime(1); for($i = 0; $i < 10; $i++) { Chat::linkifyMessage('Guckt mal das Update: http://forum.freewar.de/viewtopic.php?f=8&t=52663'); } echo $i; echo "\n"; echo (microtime(1) - $start) / $i;

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)
7.3.10.0030.01016.94
7.3.00.0130.00316.89
7.2.130.0110.00617.25
7.2.120.0060.01017.08
7.2.110.0130.00317.13
7.2.100.0080.00617.23
7.2.90.0000.01516.98
7.2.80.0110.00717.16
7.2.70.0050.00517.20
7.2.60.0100.00717.05
7.2.50.0110.00316.86
7.2.40.0120.00316.96
7.2.30.0030.01016.92
7.2.20.0100.00717.06
7.2.10.0090.00617.13
7.2.00.0050.00918.24
7.1.250.0080.00615.93
7.1.70.0000.01017.55
7.1.60.0070.01819.43
7.1.50.0040.01817.09
7.1.00.0070.03022.60
7.0.200.0000.00817.02
7.0.140.0030.07321.92
7.0.60.0070.07019.87
7.0.50.0030.08717.85
7.0.40.0070.07020.13
7.0.30.0270.07720.35
7.0.20.0330.05320.32
7.0.10.0000.07320.07
7.0.00.0070.09020.26
5.6.280.0030.07321.12
5.6.210.0070.05020.50
5.6.200.0100.05718.21
5.6.190.0000.06020.48
5.6.180.0230.07320.41
5.6.170.0200.04020.55
5.6.160.0130.07720.55
5.6.150.0100.05018.28
5.6.140.0000.09018.24
5.6.130.0000.08318.27
5.6.120.0130.07721.08
5.6.110.0100.08021.04
5.6.100.0130.07720.98
5.6.90.0070.03720.97
5.6.80.0170.07020.54
5.5.350.0270.07020.41
5.5.340.0030.07718.00
5.5.330.0030.07320.40
5.5.320.0200.07320.36
5.5.310.0430.05320.30
5.5.300.0130.07318.03
5.5.290.0130.07318.04
5.5.280.0070.08720.89
5.5.270.0100.05720.77
5.5.260.0000.08020.73
5.5.250.0070.07720.66
5.5.240.0070.06020.36
5.4.450.0930.05319.55
5.4.440.0270.05319.16
5.4.430.0270.05719.47
5.4.420.0170.06319.40
5.4.410.0130.05019.08
5.4.400.0400.06718.83
5.4.390.0270.05318.75
5.4.380.0230.04318.75
5.4.370.0170.05018.70
5.4.360.0270.03318.71
5.4.350.0070.03412.02
5.4.340.0090.03312.01
5.4.320.0070.03912.50
5.4.310.0070.05012.50
5.4.300.0070.04312.50
5.4.290.0100.04412.50
5.4.280.0080.03812.39
5.4.270.0070.04212.39
5.4.260.0040.03912.40
5.4.250.0050.04612.39
5.4.240.0130.04718.95
5.4.230.0130.05018.63
5.4.220.0070.06318.90
5.4.210.0100.05318.93
5.4.200.0100.05719.09
5.4.190.0030.07718.83
5.4.180.0200.06018.68
5.4.170.0070.05718.98
5.4.160.0030.06318.92
5.4.150.0100.04718.94
5.4.140.0030.06016.40
5.4.130.0070.04316.34
5.4.120.0070.04716.33
5.4.110.0070.05016.33
5.4.100.0130.05316.50
5.4.90.0030.06716.54
5.4.80.0030.04716.40
5.4.70.0030.07016.41
5.4.60.0170.06016.36
5.4.50.0030.05016.35
5.4.40.0100.04316.46
5.4.30.0000.05716.32
5.4.20.0100.05316.28
5.4.10.0100.07016.59
5.4.00.0070.05715.88
5.3.290.0060.04412.80
5.3.280.0000.07314.43
5.3.270.0100.06714.61
5.3.260.0070.05314.61
5.3.250.0030.05714.44
5.3.240.0070.05314.83
5.3.230.0070.06014.43
5.3.220.0070.04714.75
5.3.210.0000.05714.63
5.3.200.0030.05014.65
5.3.190.0100.04314.65
5.3.180.0000.05014.58
5.3.170.0070.05714.55
5.3.160.0100.07314.64
5.3.150.0070.05314.72
5.3.140.0200.03714.56
5.3.130.0130.04714.69
5.3.120.0000.05714.68
5.3.110.0070.07714.70
5.3.100.0030.05014.11
5.3.90.0030.05314.12
5.3.80.0030.05014.08
5.3.70.0100.04313.85
5.3.60.0000.06014.22
5.3.50.0070.04714.03
5.3.40.0030.06013.94
5.3.30.0070.04713.82
5.3.20.0030.04713.77
5.3.10.0100.04313.73
5.3.00.0070.04313.70
5.2.170.0130.03311.32
5.2.160.0030.04011.14
5.2.150.0100.04311.11
5.2.140.0070.03711.32
5.2.130.0030.03711.32
5.2.120.0030.04310.93
5.2.110.0100.04011.19
5.2.100.0000.05311.17
5.2.90.0000.04311.09
5.2.80.0030.04711.09
5.2.70.0100.05311.16
5.2.60.0000.04311.14
5.2.50.0000.05311.18
5.2.40.0070.03711.05
5.2.30.0030.04010.97
5.2.20.0000.04711.19
5.2.10.0070.04010.93
5.2.00.0000.04310.73
5.1.60.0030.03010.05
5.1.50.0030.03310.09
5.1.40.0000.0379.98
5.1.30.0070.03010.40
5.1.20.0030.03710.26
5.1.10.0000.04310.26
5.1.00.0000.0439.90
5.0.50.0030.0408.47
5.0.40.0070.0208.33
5.0.30.0070.0478.18
5.0.20.0000.0278.43
5.0.10.0000.0308.14
5.0.00.0070.0378.40
4.4.90.0000.0206.49
4.4.80.0000.0236.49
4.4.70.0130.0206.49
4.4.60.0000.0236.49
4.4.50.0000.0236.49
4.4.40.0030.0306.49
4.4.30.0030.0206.49
4.4.20.0030.0176.49
4.4.10.0030.0276.90
4.4.00.0100.0376.90
4.3.110.0030.0306.90
4.3.100.0000.0306.90
4.3.90.0000.0206.90
4.3.80.0070.0306.90
4.3.70.0030.0176.90
4.3.60.0070.0236.90
4.3.50.0000.0276.90
4.3.40.0000.0336.90
4.3.30.0030.0276.90
4.3.20.0000.0236.90
4.3.10.0000.0276.90
4.3.00.0170.0208.54

preferences:
40.18 ms | 401 KiB | 5 Q