3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'choukai kai hey this matches too 432-2123'; $search = array('surfing', 'joke and stuff', 'smile and etc', '3-2', 'choukai kai', 'choukai'); // Massage the message $message = preg_replace( '/(' . implode('|', array_map('preg_quote', $search)) . ')/i', '%%$1%%', %message ); var_dump($message); $replacements = array( // here all replaces | each in a new line - watch the syntax // all html possible, but no single quotation mark! '<a href="http://en.wikipedia.org/wiki/Surfing" style="color:darkred;font-weight:bold;">surfing</a>', '<a href="http://en.wikipedia.org/wiki/Joke" style="color:darkred;font-weight:bold;">joke</a>', '<a href="http://en.wikipedia.org/wiki/Smiling" style="color:darkred;font-weight:bold;">Smile</a>', '<a class="screenshot" rel="3-2_Map.jpg">3-2</a>', '<a href="http://en.wikipedia.org/wiki/Joke" style="color:darkred;font-weight:bold;">Choukai Kai</a>', '<a href="http://en.wikipedia.org/wiki/Smiling" style="color:darkred;font-weight:bold;">Choukai</a>' );

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)
5.4.240.0050.03712.38
5.4.230.0130.04412.37
5.4.220.0110.04112.36
5.4.210.0080.04312.37
5.4.200.0100.04412.37
5.4.190.0100.04212.36
5.4.180.0090.04412.36
5.4.170.0100.04512.37
5.4.160.0100.04912.36
5.4.150.0110.03912.36
5.4.140.0090.04012.05
5.4.130.0110.03812.03
5.4.120.0170.05812.00
5.4.110.0100.04012.00
5.4.100.0130.04311.99
5.4.90.0130.05212.00
5.4.80.0110.04611.99
5.4.70.0100.04211.99
5.4.60.0100.03911.99
5.4.50.0100.03911.99
5.4.40.0110.03811.98
5.4.30.0090.04111.97
5.4.20.0130.03811.97
5.4.10.0120.04111.97
5.4.00.0100.03911.47
5.3.280.0110.05112.71
5.3.270.0110.04312.72
5.3.260.0090.04712.72
5.3.250.0230.05012.72
5.3.240.0140.04212.72
5.3.230.0140.04812.71
5.3.220.0090.05112.68
5.3.210.0150.06212.68
5.3.200.0110.04412.68
5.3.190.0120.04612.68
5.3.180.0130.04812.67
5.3.170.0110.04712.67
5.3.160.0120.04612.67
5.3.150.0140.05612.67
5.3.140.0080.04512.66
5.3.130.0120.04512.66
5.3.120.0120.04612.66
5.3.110.0100.05012.66
5.3.100.0110.04112.12
5.3.90.0090.04412.08
5.3.80.0150.04512.07
5.3.70.0100.04812.08
5.3.60.0130.05112.06
5.3.50.0100.04012.00
5.3.40.0140.05512.00
5.3.30.0100.04011.94
5.3.20.0120.04411.71
5.3.10.0120.03711.68
5.3.00.0120.04211.67

preferences:
139.32 ms | 1394 KiB | 7 Q