3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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;
Output for 7.1.0
100 3.3187866210937E-6
Output for 7.0.14
100 3.2186508178711E-6
Output for 7.0.6
100 1.9192695617676E-6
Output for 7.0.5
100 2.7012825012207E-6
Output for 7.0.4
100 2.0980834960938E-6
Output for 7.0.2 - 7.0.3
100 2.3102760314941E-6
Output for 5.5.31, 5.6.14, 7.0.1
100 2.589225769043E-6
Output for 7.0.0
100 3.0207633972168E-6
Output for hhvm-3.12.0
100 6.2394142150879E-6
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
100 5.1712989807129E-6
Output for 5.5.32, 5.6.21
100 2.4604797363281E-6
Output for 5.6.20
100 3.7407875061035E-6
Output for 5.6.19
100 5.6290626525879E-6
Output for 5.4.25, 5.6.18
100 3.9196014404297E-6
Output for 5.6.17
100 2.598762512207E-6
Output for 5.6.16
100 3.7598609924316E-6
Output for 5.6.15
100 2.5391578674316E-6
Output for 5.4.30, 5.6.13
100 3.5619735717773E-6
Output for 5.4.1, 5.4.16, 5.6.12
100 4.2390823364258E-6
Output for 5.6.11
100 3.6406517028809E-6
Output for 5.6.10
100 4.119873046875E-6
Output for 5.6.9
100 3.9815902709961E-6
Output for 5.6.8
100 4.1294097900391E-6
Output for 5.6.7
100 2.6893615722656E-6
Output for 5.5.35
100 3.2997131347656E-6
Output for 5.5.34
100 3.7217140197754E-6
Output for 5.5.33
100 3.7097930908203E-6
Output for 5.5.30
100 3.2401084899902E-6
Output for 5.5.29
100 2.7203559875488E-6
Output for 5.5.28
100 4.0197372436523E-6
Output for 5.5.27
100 2.9683113098145E-6
Output for 5.4.31, 5.5.26
100 4.1890144348145E-6
Output for 5.5.25
100 3.5691261291504E-6
Output for 5.5.24
100 4.0316581726074E-6
Output for 5.4.45
100 2.2292137145996E-6
Output for 5.4.39, 5.4.44
100 5.5885314941406E-6
Output for 5.4.43
100 4.9281120300293E-6
Output for 5.4.42
100 7.4219703674316E-6
Output for 5.4.41
100 8.0084800720215E-6
Output for 5.4.40
100 5.948543548584E-6
Output for 5.4.38
100 5.950927734375E-6
Output for 5.4.37
100 7.9584121704102E-6
Output for 5.4.29, 5.4.36
100 5.0592422485352E-6
Output for 5.4.35
100 6.2298774719238E-6
Output for 5.4.34
100 6.1297416687012E-6
Output for 5.2.7, 5.4.32
100 4.730224609375E-6
Output for 5.4.28
100 8.4710121154785E-6
Output for 5.4.27
100 4.8494338989258E-6
Output for 5.4.26
100 3.8599967956543E-6
Output for 5.4.7, 5.4.24
100 4.5013427734375E-6
Output for 5.4.23
100 4.3106079101562E-6
Output for 5.4.22
100 4.1580200195313E-6
Output for 5.4.21
100 4.6801567077637E-6
Output for 5.4.20
100 4.6396255493164E-6
Output for 5.4.19
100 4.570484161377E-6
Output for 5.4.18
100 4.6682357788086E-6
Output for 5.4.17
100 4.7993659973145E-6
Output for 5.4.15
100 4.3988227844238E-6
Output for 5.4.14
100 4.1913986206055E-6
Output for 5.4.13
100 4.4107437133789E-6
Output for 5.4.12
100 4.0602684020996E-6
Output for 5.4.11
100 4.0793418884277E-6
Output for 5.4.10
100 4.2414665222168E-6
Output for 5.4.9
100 4.4989585876465E-6
Output for 5.4.8
100 4.2104721069336E-6
Output for 5.4.6
100 4.2891502380371E-6
Output for 5.4.5
100 4.1794776916504E-6
Output for 5.4.4
100 3.809928894043E-6
Output for 5.4.3
100 7.8082084655762E-6
Output for 5.4.2
100 5.0997734069824E-6
Output for 5.4.0
100 4.4894218444824E-6
Output for 5.3.29
100 4.270076751709E-6
Output for 5.3.28
100 8.3398818969727E-6
Output for 5.3.27
100 5.1307678222656E-6
Output for 5.3.26
100 5.6195259094238E-6
Output for 5.3.25
100 8.3494186401367E-6
Output for 5.2.12, 5.3.24
100 5.3095817565918E-6
Output for 5.3.23
100 4.7898292541504E-6
Output for 5.3.22
100 7.1191787719727E-6
Output for 5.3.21
100 6.2179565429687E-6
Output for 5.3.20
100 8.2087516784668E-6
Output for 5.3.19
100 4.5204162597656E-6
Output for 5.3.18
100 4.5609474182129E-6
Output for 5.2.5, 5.3.17
100 5.2785873413086E-6
Output for 5.3.16
100 6.718635559082E-6
Output for 5.3.15
100 5.1498413085938E-6
Output for 5.3.14
100 5.7601928710938E-6
Output for 5.3.13
100 4.8995018005371E-6
Output for 5.3.12
100 5.500316619873E-6
Output for 5.3.11
100 6.1702728271484E-6
Output for 5.3.10
100 5.4097175598145E-6
Output for 5.3.9
100 4.4703483581543E-6
Output for 5.2.11, 5.3.8
100 4.9710273742676E-6
Output for 5.3.7
100 5.9199333190918E-6
Output for 5.3.6
100 4.429817199707E-6
Output for 5.3.5
100 4.7802925109863E-6
Output for 5.3.4
100 4.9400329589844E-6
Output for 5.3.3
100 4.6706199645996E-6
Output for 5.3.2
100 4.5084953308105E-6
Output for 5.3.1
100 9.8705291748047E-6
Output for 5.3.0
100 4.8518180847168E-6
Output for 5.2.17
100 5.030632019043E-6
Output for 5.2.16
100 4.9304962158203E-6
Output for 5.2.9, 5.2.15
100 5.028247833252E-6
Output for 5.2.14
100 4.9591064453125E-6
Output for 5.2.13
100 5.7721138000488E-6
Output for 5.2.10
100 5.1593780517578E-6
Output for 5.2.8
100 5.2094459533691E-6
Output for 5.2.6
100 4.8208236694336E-6
Output for 5.2.4
100 5.1617622375488E-6
Output for 5.2.3
100 5.1403045654297E-6
Output for 5.2.2
100 5.7196617126465E-6
Output for 5.2.1
100 5.6195259094238E-06
Output for 5.2.0
100 5.6099891662598E-06
Output for 5.1.6
100 6.5398216247559E-06
Output for 5.1.5
100 5.7506561279297E-06
Output for 5.1.4
100 6.8497657775879E-06
Output for 5.1.3
100 5.5384635925293E-06
Output for 5.1.2
100 6.2298774719238E-06
Output for 5.1.1
100 1.0600090026855E-05
Output for 5.1.0
100 6.1988830566406E-06
Output for 5.0.5
100 6.9308280944824E-06
Output for 5.0.4
100 6.7806243896484E-06
Output for 5.0.3
100 6.5302848815918E-06
Output for 5.0.2
100 7.8606605529785E-06
Output for 5.0.1
100 7.1597099304199E-06
Output for 5.0.0
100 7.1501731872559E-06
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/pl6OL on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/pl6OL on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/pl6OL on line 4
Process exited with code 255.