3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'This is a string using the terms? Wait here\'s one abukuma kai abukuma-kai abukuma abukuma'; $search = array( 'abukuma kai', 'abukuma' ); // Massage the message $message = preg_replace( array_map( function($s) { $s = preg_quote($s) $s = str_replace(' ', '[ -_]', $s); return '/' . $s . '/'; ), array_map( function ($s) { return '%%' . $s . '%%' }, array_keys($search) ), $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://kancolle.wikia.com/wiki/Abukuma#Upgrade" class="screenshot" rel="ship/Abukuma_Kai.png" style="color:#0073e6; font-weight:bold; border-bottom: 1px #0073e6 dashed;"><p id="yosup">Abukuma Kai</p></a>', '<a href="http://kancolle.wikia.com/wiki/Abukuma#Basic" class="screenshot" rel="ship/Abukuma.png" style="color:#0073e6; font-weight:bold; border-bottom: 1px #0073e6 dashed;">Abukuma</a>' ); $message = str_replace( array_map(function($s) { return '%%' . $s . '%%'; }, array_keys($replacements)), $replacements, $message );

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.0290.03014.62
5.4.230.0280.04114.62
5.4.220.0290.03014.60
5.4.210.0290.02914.62
5.4.200.0290.02813.80
5.4.190.0280.03214.67
5.4.180.0290.03014.63
5.4.170.0290.03014.60
5.4.160.0260.03014.61
5.4.150.0290.02814.60
5.4.140.0300.02813.59
5.4.130.0300.03613.46
5.4.120.0250.03213.56
5.4.110.0270.02913.50
5.4.100.0260.03113.54
5.4.90.0270.03013.50
5.4.80.0280.02813.53
5.4.70.0320.03613.42
5.4.60.0290.02913.54
5.4.50.0270.03013.51
5.4.40.0300.02713.47
5.4.30.0280.02713.52
5.4.20.0290.03113.48
5.4.10.0330.03113.40
5.4.00.0260.02713.01
5.3.280.0320.03013.29
5.3.270.0280.03613.36
5.3.260.0320.03313.35
5.3.250.0280.03313.32
5.3.240.0340.03413.37
5.3.230.0270.03513.31
5.3.220.0280.03413.33
5.3.210.0290.03413.28
5.3.200.0280.03413.33
5.3.190.0290.03313.27
5.3.180.0300.03313.30
5.3.170.0300.03413.30
5.3.160.0280.03413.31
5.3.150.0290.03413.27
5.3.140.0300.03313.26
5.3.130.0280.03413.34
5.3.120.0280.03513.28
5.3.110.0300.03313.31
5.3.100.0310.03012.76
5.3.90.0280.03212.77
5.3.80.0260.03312.70
5.3.70.0300.03112.75
5.3.60.0290.03612.74
5.3.50.0280.03312.63
5.3.40.0300.03312.69
5.3.30.0260.03512.62
5.3.20.0300.03312.37
5.3.10.0280.03212.35
5.3.00.0290.03212.35

preferences:
141.57 ms | 1394 KiB | 7 Q