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 < 100; $i++) { echo Chat::linkifyMessage('Guckt mal das Update: http://forum.freewar.de/viewtopic.php?f=8&t=52663'); echo "\n\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.0090.00416.68
7.3.00.0120.00816.86
7.2.130.0150.00816.82
7.2.120.0150.01116.96
7.2.110.0000.01517.06
7.2.100.0070.01617.03
7.2.90.0050.01617.18
7.2.80.0190.00617.01
7.2.70.0150.00516.99
7.2.60.0080.01016.92
7.2.50.0070.01417.02
7.2.40.0030.01416.88
7.2.30.0060.00917.02
7.2.20.0130.00617.19
7.2.10.0130.00017.18
7.2.00.0080.00518.32
7.1.250.0000.01515.85
7.1.70.0000.00717.41
7.1.60.0070.01719.43
7.1.50.0030.02017.12
7.1.00.0030.07022.36
7.0.200.0040.00717.04
7.0.140.0170.06322.18
7.0.60.0100.08019.92
7.0.50.0130.06017.88
7.0.40.0130.03720.05
7.0.30.0230.03720.13
7.0.20.0470.06720.11
7.0.10.0270.05020.26
7.0.00.0030.06020.20
5.6.280.0070.07320.82
5.6.210.0070.08720.52
5.6.200.0070.08718.15
5.6.190.0070.08720.61
5.6.180.0100.04320.41
5.6.170.0200.04020.45
5.6.160.0130.07020.47
5.6.150.0070.07718.27
5.6.140.0070.08318.29
5.6.130.0030.08318.28
5.6.120.0000.05021.13
5.6.110.0100.08021.06
5.6.100.0130.07721.11
5.6.90.0100.07721.10
5.6.80.0130.03720.38
5.6.70.0400.06720.35
5.5.350.0100.07320.44
5.5.340.0130.07317.99
5.5.330.0130.08020.42
5.5.320.0230.08320.34
5.5.310.0270.07720.37
5.5.300.0100.07717.98
5.5.290.0070.06318.08
5.5.280.0030.04020.97
5.5.270.0030.04320.80
5.5.260.0070.08720.80
5.5.250.0130.07320.72
5.5.240.0070.07720.27
5.4.450.0900.06019.48
5.4.440.0870.06719.31
5.4.430.0930.07019.57
5.4.420.0900.06719.19
5.4.410.1070.05719.60
5.4.400.1130.07318.73
5.4.390.1070.04718.71
5.4.380.0200.05718.80
5.4.370.0330.04718.53
5.4.360.0130.05018.78
5.4.350.0100.04112.02
5.4.340.0040.03812.02
5.4.320.0070.04012.51
5.4.310.0080.04112.50
5.4.300.0080.04212.51
5.4.290.0060.04212.50
5.4.280.0090.04012.39
5.4.270.0080.03912.39
5.4.260.0090.04512.40
5.4.250.0100.04212.40
5.4.240.0030.05318.78
5.4.230.0070.05719.09
5.4.220.0070.06318.73
5.4.210.0030.07718.96
5.4.200.0070.05718.89
5.4.190.0030.07318.93
5.4.180.0030.05318.93
5.4.170.0100.06318.72
5.4.160.0100.05018.92
5.4.150.0100.05718.89
5.4.140.0070.07016.36
5.4.130.0130.05716.39
5.4.120.0100.05016.38
5.4.110.0130.05016.32
5.4.100.0000.05316.35
5.4.90.0000.05316.55
5.4.80.0030.06716.52
5.4.70.0100.05316.54
5.4.60.0100.05016.52
5.4.50.0070.04716.47
5.4.40.0000.05716.53
5.4.30.0100.06016.51
5.4.20.0070.06716.41
5.4.10.0070.05016.58
5.4.00.0030.05015.78
5.3.290.0080.03912.80
5.3.280.0100.04714.77
5.3.270.0130.04714.51
5.3.260.0130.06314.77
5.3.250.0030.07314.83
5.3.240.0070.06314.68
5.3.230.0170.05714.62
5.3.220.0030.05314.66
5.3.210.0100.05314.79
5.3.200.0030.05314.55
5.3.190.0030.05314.79
5.3.180.0070.06014.70
5.3.170.0030.05314.63
5.3.160.0100.04714.71
5.3.150.0070.06014.70
5.3.140.0100.06314.73
5.3.130.0070.08014.54
5.3.120.0070.06714.64
5.3.110.0000.06014.63
5.3.100.0100.05314.01
5.3.90.0070.06014.18
5.3.80.0030.07314.04
5.3.70.0000.07713.92
5.3.60.0030.05313.83
5.3.50.0130.05713.95
5.3.40.0130.04314.03
5.3.30.0030.06013.82
5.3.20.0030.06313.78
5.3.10.0070.05713.74
5.3.00.0100.06313.81
5.2.170.0100.04011.30
5.2.160.0100.04011.23
5.2.150.0070.04011.14
5.2.140.0070.05311.22
5.2.130.0100.05310.93
5.2.120.0070.03711.17
5.2.110.0030.05311.18
5.2.100.0070.05310.96
5.2.90.0030.04011.18
5.2.80.0130.04011.08
5.2.70.0000.04711.17
5.2.60.0070.04711.13
5.2.50.0030.06011.12
5.2.40.0070.04711.17
5.2.30.0100.05010.97
5.2.20.0070.04711.04
5.2.10.0070.04710.96
5.2.00.0070.04010.83
5.1.60.0000.05010.24
5.1.50.0070.03310.24
5.1.40.0070.03310.07
5.1.30.0030.05010.29
5.1.20.0100.03310.43
5.1.10.0030.04010.14
5.1.00.0070.05310.16
5.0.50.0070.0338.52
5.0.40.0000.0338.48
5.0.30.0100.0508.21
5.0.20.0070.0338.25
5.0.10.0100.0378.18
5.0.00.0030.0438.24
4.4.90.0000.0236.48
4.4.80.0070.0206.48
4.4.70.0070.0276.48
4.4.60.0000.0236.48
4.4.50.0000.0206.48
4.4.40.0000.0506.48
4.4.30.0030.0206.48
4.4.20.0070.0206.48
4.4.10.0070.0176.48
4.4.00.0070.0306.48
4.3.110.0100.0136.48
4.3.100.0100.0206.48
4.3.90.0000.0236.48
4.3.80.0030.0406.48
4.3.70.0000.0206.47
4.3.60.0000.0206.47
4.3.50.0000.0236.47
4.3.40.0070.0276.47
4.3.30.0000.0336.47
4.3.20.0030.0206.47
4.3.10.0000.0236.47
4.3.00.0100.0237.09

preferences:
42.35 ms | 401 KiB | 5 Q