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++) { 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.0110.00416.91
7.3.00.0100.00716.85
7.2.130.0100.00317.22
7.2.120.0080.00617.08
7.2.110.0100.00717.26
7.2.100.0060.00916.95
7.2.90.0030.00916.90
7.2.80.0170.00717.07
7.2.70.0060.01017.33
7.2.60.0130.00316.91
7.2.50.0090.00617.25
7.2.40.0040.01117.10
7.2.30.0140.00717.30
7.2.20.0080.00317.19
7.2.10.0040.01117.15
7.2.00.0050.01118.53
7.1.250.0000.01016.12
7.1.70.0000.00817.46
7.1.60.0060.01619.29
7.1.50.0050.01017.20
7.1.00.0000.08022.34
7.0.200.0000.00817.10
7.0.140.0030.07321.98
7.0.60.0030.04019.79
7.0.50.0070.04717.85
7.0.40.0030.05719.98
7.0.30.0430.05020.29
7.0.20.0270.05020.14
7.0.10.0200.07020.28
7.0.00.0070.09020.25
5.6.280.0000.07321.10
5.6.210.0000.04320.50
5.6.200.0100.07718.22
5.6.190.0000.06020.61
5.6.180.0030.08720.51
5.6.170.0230.06320.56
5.6.160.0130.07720.50
5.6.150.0130.03018.12
5.6.140.0070.04018.21
5.6.130.0030.06718.15
5.6.120.0130.07721.02
5.6.110.0170.06721.13
5.6.100.0100.08321.04
5.6.90.0100.07320.95
5.6.80.0130.07320.52
5.6.70.4570.04020.52
5.5.350.0070.07320.39
5.5.340.0170.07017.98
5.5.330.0070.07720.38
5.5.320.0100.03320.34
5.5.310.0230.04020.35
5.5.300.0070.07018.08
5.5.290.0030.04717.98
5.5.280.0000.08720.91
5.5.270.0070.05320.96
5.5.260.0200.07320.64
5.5.250.0030.06320.54
5.5.240.0170.07020.36
5.4.450.0030.03319.57
5.4.440.0130.06319.43
5.4.430.0130.06319.58
5.4.420.0400.06319.69
5.4.410.0300.06319.45
5.4.400.0270.05318.99
5.4.390.0170.06019.23
5.4.380.0130.05718.50
5.4.370.0630.07018.73
5.4.360.0400.05018.75
5.4.350.0630.04018.80
5.4.340.0430.04718.75
5.4.320.0070.03812.51
5.4.310.0040.04512.50
5.4.300.0030.04312.51
5.4.290.0050.03912.50
5.4.280.0100.04212.40
5.4.270.0080.03612.40
5.4.260.0100.04312.40
5.4.250.0080.03812.40
5.4.240.0040.04012.39
5.4.230.0100.03912.38
5.4.220.0060.03712.38
5.4.210.0080.03412.38
5.4.200.0070.04012.38
5.4.190.0070.03812.38
5.4.180.0090.03712.38
5.4.170.0040.04312.39
5.4.160.0040.04012.38
5.4.150.0050.04112.38
5.4.140.0070.03812.07
5.4.130.0050.03712.05
5.4.120.0040.03712.01
5.4.110.0040.03712.01
5.4.100.0080.03312.00
5.4.90.0050.03712.00
5.4.80.0060.03712.00
5.4.70.0080.03412.00
5.4.60.0060.03412.01
5.4.50.0050.03612.00
5.4.40.0090.03611.99
5.4.30.0050.04411.99
5.4.20.0080.04311.98
5.4.10.0060.04511.98
5.4.00.0040.03811.47
5.3.290.0100.03712.80
5.3.280.0090.04012.71
5.3.270.0050.04312.72
5.3.260.0050.04212.72
5.3.250.0090.04912.72
5.3.240.0110.03612.72
5.3.230.0050.04212.71
5.3.220.0060.03912.68
5.3.210.0110.03712.68
5.3.200.0080.04812.68
5.3.190.0050.04112.68
5.3.180.0040.03912.67
5.3.170.0050.03912.67
5.3.160.0060.03812.67
5.3.150.0060.03812.67
5.3.140.0060.03912.66
5.3.130.0020.04312.66
5.3.120.0080.04412.66
5.3.110.0110.03712.66
5.3.100.0080.03812.12
5.3.90.0070.03712.10
5.3.80.0040.03912.08
5.3.70.0070.04512.08
5.3.60.0060.03712.07
5.3.50.0040.03812.02
5.3.40.0030.03912.02
5.3.30.0090.03111.98
5.3.20.0020.03911.76
5.3.10.0040.03811.72
5.3.00.0090.03311.71
5.2.170.0070.0289.21
5.2.160.0070.0279.22
5.2.150.0070.0289.22
5.2.140.0050.0299.21
5.2.130.0050.0299.17
5.2.120.0080.0259.17
5.2.110.0060.0279.18
5.2.100.0080.0249.18
5.2.90.0060.0289.18
5.2.80.0070.0289.17
5.2.70.0020.0339.16
5.2.60.0060.0299.12
5.2.50.0050.0299.09
5.2.40.0050.0299.08
5.2.30.0050.0299.05
5.2.20.0040.0359.05
5.2.10.0020.0318.97
5.2.00.0040.0308.83
5.1.60.0040.0248.11
5.1.50.0040.0268.11
5.1.40.0060.0288.09
5.1.30.0040.0298.44
5.1.20.0060.0288.46
5.1.10.0070.0328.19
5.1.00.0030.0278.18
5.0.50.0070.0196.66
5.0.40.0040.0196.52
5.0.30.0050.0306.34
5.0.20.0030.0206.30
5.0.10.0040.0196.28
5.0.00.0050.0296.27
4.4.90.0020.0164.78
4.4.80.0030.0204.75
4.4.70.0030.0154.75
4.4.60.0040.0144.76
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0010.0174.75
4.4.20.0010.0184.85
4.4.10.0030.0204.85
4.4.00.0050.0264.76
4.3.110.0030.0184.67
4.3.100.0020.0154.66
4.3.90.0010.0164.63
4.3.80.0040.0234.59
4.3.70.0050.0124.63
4.3.60.0030.0144.63
4.3.50.0030.0214.63
4.3.40.0040.0264.54
4.3.30.0040.0153.28
4.3.20.0030.0143.26
4.3.10.0050.0153.22
4.3.00.0400.02713.14

preferences:
27.32 ms | 401 KiB | 5 Q