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 < 2; $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.2.00.0040.01119.90
7.1.70.0000.00717.37
7.1.60.0090.01519.43
7.1.50.0130.00917.14
7.1.00.0000.03722.35
7.0.200.0050.00317.02
7.0.140.0000.07722.12
7.0.60.0100.07719.94
7.0.50.0000.05317.88
7.0.40.0030.04720.11
7.0.30.0200.05020.20
7.0.20.0330.07320.30
7.0.10.0330.08020.21
7.0.00.0100.04320.15
5.6.210.0030.04320.67
5.6.200.0070.07718.15
5.6.190.0070.05020.54
5.6.180.0100.04720.46
5.6.170.0430.07320.54
5.6.160.0030.04320.71
5.6.150.0030.08318.15
5.6.140.0030.06318.14
5.6.130.0130.07318.19
5.6.120.0100.06721.04
5.6.110.0030.05721.00
5.6.100.0130.07720.99
5.6.90.0100.04720.96
5.6.80.0000.04720.42
5.6.70.0300.07020.48
5.5.350.0030.08720.39
5.5.340.0070.08317.99
5.5.330.0100.08320.35
5.5.320.0130.04720.36
5.5.310.0200.04320.23
5.5.300.0070.04017.94
5.5.290.0170.05017.95
5.5.280.0000.04320.77
5.5.270.0170.07320.77
5.5.260.0170.07320.84
5.5.250.0100.07320.59
5.5.240.0030.08020.35
5.4.450.0800.05719.17
5.4.440.1030.04719.58
5.4.430.1000.06319.63
5.4.420.1230.05719.32
5.4.410.1300.06019.50
5.4.400.0630.06018.85
5.4.390.1330.07318.76
5.4.380.0270.05018.79
5.4.370.0200.07018.74
5.4.360.0100.05318.80
5.4.350.0090.03312.02
5.4.340.0060.03512.02
5.4.320.0080.03412.50
5.4.310.0070.04412.50
5.4.300.0070.03612.50
5.4.290.0060.03812.50
5.4.280.0060.04212.40
5.4.270.0080.03312.40
5.4.260.0090.03912.39
5.4.250.0070.03612.39
5.4.240.0130.04718.89
5.4.230.0030.05318.75
5.4.220.0100.05018.87
5.4.210.0100.05018.99
5.4.200.0100.04718.88
5.4.190.0130.05319.01
5.4.180.0070.05318.96
5.4.170.0100.04718.83
5.4.160.0070.05318.90
5.4.150.0200.06318.88
5.4.140.0030.05016.33
5.4.130.0030.05016.42
5.4.120.0070.04716.32
5.4.110.0070.04716.38
5.4.100.0070.04716.27
5.4.90.0070.04316.48
5.4.80.0030.05016.40
5.4.70.0000.05016.53
5.4.60.0070.05016.52
5.4.50.0100.04716.49
5.4.40.0000.06316.57
5.4.30.0070.04316.43
5.4.20.0030.06316.38
5.4.10.0000.05716.50
5.4.00.0030.05015.98
5.3.290.0050.05212.80
5.3.280.0070.05014.76
5.3.270.0070.05314.69
5.3.260.0100.07014.52
5.3.250.0130.04714.43
5.3.240.0070.07714.59
5.3.230.0070.04714.67
5.3.220.0070.04714.65
5.3.210.0030.05314.56
5.3.200.0030.05014.65
5.3.190.0070.04714.55
5.3.180.0030.04714.58
5.3.170.0030.05014.55
5.3.160.0070.05714.72
5.3.150.0070.06014.67
5.3.140.0070.05014.57
5.3.130.0030.05714.70
5.3.120.0070.04714.63
5.3.110.0070.05014.38
5.3.100.0130.04014.04
5.3.90.0030.05314.00
5.3.80.0000.05014.08
5.3.70.0030.06014.18
5.3.60.0000.06313.98
5.3.50.0000.05314.03
5.3.40.0000.06014.04
5.3.30.0070.06313.99
5.3.20.0000.05013.88
5.3.10.0100.05013.87
5.3.00.0030.07313.73
5.2.170.0070.03711.11
5.2.160.0070.04011.13
5.2.150.0030.04011.22
5.2.140.0030.04011.04
5.2.130.0070.03711.18
5.2.120.0070.03711.28
5.2.110.0030.03711.19
5.2.100.0030.03711.07
5.2.90.0030.04011.09
5.2.80.0030.05011.05
5.2.70.0100.05711.27
5.2.60.0030.05011.03
5.2.50.0000.05010.97
5.2.40.0000.04011.18
5.2.30.0070.03711.14
5.2.20.0100.04711.14
5.2.10.0000.05010.93
5.2.00.0000.04310.68
5.1.60.0000.04310.05
5.1.50.0070.04010.04
5.1.40.0100.03710.14
5.1.30.0070.04310.43
5.1.20.0000.04010.58
5.1.10.0070.03710.12
5.1.00.0000.04710.16
5.0.50.0070.0338.64
5.0.40.0030.0278.46
5.0.30.0000.0478.42
5.0.20.0000.0278.25
5.0.10.0030.0278.32
5.0.00.0070.0438.25
4.4.90.0070.0176.89
4.4.80.0000.0206.89
4.4.70.0030.0176.89
4.4.60.0000.0206.89
4.4.50.0000.0236.89
4.4.40.0000.0336.89
4.4.30.0030.0276.89
4.4.20.0070.0176.89
4.4.10.0030.0236.89
4.4.00.0030.0306.89
4.3.110.0000.0236.89
4.3.100.0000.0306.89
4.3.90.0030.0176.89
4.3.80.0100.0336.89
4.3.70.0030.0176.89
4.3.60.0000.0236.89
4.3.50.0030.0206.89
4.3.40.0030.0306.89
4.3.30.0070.0276.89
4.3.20.0000.0236.85
4.3.10.0030.0206.85
4.3.00.0170.0177.09

preferences:
38.26 ms | 401 KiB | 5 Q