3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = "This is a string using the terms? Wait here's one\n abukuma kai\nabukuma-kai\nabukuma\nabukuma\nkai abukuma abukuma kai"; $search = array( 'abukuma kai', 'abukuma' ); $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>' ); // Massage the message $message = preg_replace( array_map( function($s) { $s = preg_quote($s); $s = str_replace(' ', '[ -_]', $s); return '/' . $s . '/'; }, $search ), array_map( function ($s) { return '%%' . $s . '%%'; }, array_keys($search) ), $message ); $message = str_replace( array_map( function($s) { return '%%' . $s . '%%'; }, array_keys($replacements) ), $replacements, $message ); var_dump($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)
8.3.60.0120.00318.55
8.3.50.0120.00821.97
8.3.40.0140.00018.85
8.3.30.0060.00920.29
8.3.20.0040.00420.15
8.3.10.0050.00322.02
8.3.00.0040.00422.26
8.2.180.0200.00316.50
8.2.170.0120.00622.96
8.2.160.0100.00722.15
8.2.150.0050.00524.18
8.2.140.0050.00524.66
8.2.130.0050.00326.16
8.2.120.0080.00020.80
8.2.110.0100.00021.10
8.2.100.0120.00018.16
8.2.90.0040.00419.22
8.2.80.0030.00617.97
8.2.70.0080.00017.75
8.2.60.0080.00018.03
8.2.50.0060.00318.10
8.2.40.0040.00419.89
8.2.30.0040.00419.44
8.2.20.0030.00617.89
8.2.10.0040.00417.85
8.2.00.0090.00017.91
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0100.00024.01
8.1.230.0070.00417.82
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0050.00517.50
8.1.190.0040.00417.48
8.1.180.0030.00518.10
8.1.170.0000.00818.77
8.1.160.0050.00318.88
8.1.150.0000.00818.87
8.1.140.0060.00317.68
8.1.130.0000.00817.88
8.1.120.0040.00417.64
8.1.110.0040.00417.54
8.1.100.0000.00817.66
8.1.90.0040.00317.53
8.1.80.0000.00717.67
8.1.70.0000.00717.66
8.1.60.0030.00517.76
8.1.50.0020.00517.66
8.1.40.0030.00517.71
8.1.30.0060.00317.76
8.1.20.0040.00417.72
8.1.10.0040.00417.71
8.1.00.0000.00817.50
8.0.300.0030.00618.77
8.0.290.0000.00816.75
8.0.280.0030.00318.43
8.0.270.0070.00017.22
8.0.260.0080.00016.99
8.0.250.0000.00717.16
8.0.240.0060.00317.07
8.0.230.0000.00717.06
8.0.220.0030.00317.04
8.0.210.0000.00717.09
8.0.200.0030.00317.09
8.0.190.0040.00417.12
8.0.180.0050.00317.07
8.0.170.0030.00517.09
8.0.160.0040.00417.07
8.0.150.0070.00017.09
8.0.140.0040.00417.10
8.0.130.0030.00313.36
8.0.120.0090.00016.96
8.0.110.0000.00717.07
8.0.100.0040.00416.91
8.0.90.0050.00216.86
8.0.80.0030.01216.99
8.0.70.0080.00017.03
8.0.60.0070.00016.98
8.0.50.0040.00417.00
8.0.30.0100.01017.11
8.0.20.0080.01017.50
8.0.10.0090.00017.05
8.0.00.0100.01117.05
7.4.330.0000.00615.00
7.4.320.0030.00316.82
7.4.300.0000.00616.78
7.4.290.0030.00516.71
7.4.280.0040.00416.63
7.4.270.0030.00316.73
7.4.260.0060.00013.36
7.4.250.0050.00216.61
7.4.240.0030.00416.86
7.4.230.0030.00316.81
7.4.220.0030.01416.80
7.4.210.0090.00716.79
7.4.200.0000.00716.86
7.4.190.0000.00716.91
7.4.160.0160.00716.68
7.4.150.0090.00917.40
7.4.140.0110.00617.86
7.4.130.0110.01116.73
7.4.120.0100.00716.78
7.4.110.0090.00916.85
7.4.100.0100.01016.60
7.4.90.0070.01116.83
7.4.80.0030.01319.39
7.4.70.0070.01016.82
7.4.60.0100.00716.75
7.4.50.0050.00016.52
7.4.40.0090.00622.77
7.4.30.0110.00616.68
7.4.00.0060.01015.30
7.3.330.0030.00313.40
7.3.320.0000.00513.46
7.3.310.0000.00716.49
7.3.300.0000.00716.40
7.3.290.0060.00916.50
7.3.280.0120.00516.43
7.3.270.0080.00817.40
7.3.260.0250.02916.48
7.3.250.0110.00716.66
7.3.240.0100.00716.72
7.3.230.0100.01316.82
7.3.210.0030.01316.54
7.3.200.0070.01119.39
7.3.190.0060.01116.71
7.3.180.0090.00616.38
7.3.170.0100.00616.71
7.3.160.0080.01316.63
7.3.120.0110.00614.70
7.3.110.0080.00814.83
7.3.100.0110.00714.90
7.3.90.0050.00514.77
7.3.80.0030.00714.87
7.3.70.0040.01115.22
7.3.60.0100.00414.86
7.3.50.0070.01015.00
7.3.40.0040.01114.85
7.3.30.0080.00614.87
7.3.20.0060.00316.72
7.3.10.0030.01016.83
7.3.00.0030.01316.72
7.2.330.0150.00316.86
7.2.320.0060.01316.79
7.2.310.0060.01216.82
7.2.300.0100.00616.82
7.2.290.0130.00316.69
7.2.250.0070.00714.90
7.2.240.0120.00715.28
7.2.230.0070.01015.14
7.2.220.0090.00415.29
7.2.210.0080.01115.23
7.2.200.0040.01115.24
7.2.190.0060.00915.27
7.2.180.0000.01115.34
7.2.170.0000.01615.29
7.2.00.0050.01418.81
7.1.330.0030.01016.11
7.1.320.0040.01115.90
7.1.310.0090.00615.84
7.1.300.0000.01315.87
7.1.290.0070.00716.00
7.1.280.0030.00615.69
7.1.270.0090.00315.75
7.1.260.0060.00616.02
7.1.100.0250.01218.29
7.1.70.0030.00717.32
7.1.60.0100.00317.53
7.1.50.0090.01217.13
7.1.00.0030.05022.47
7.0.200.0030.01416.61
7.0.140.0030.07021.97
7.0.100.0400.05319.94
7.0.90.0430.08019.86
7.0.80.0430.04019.89
7.0.70.0300.07720.00
7.0.60.0370.06319.97
7.0.50.0330.04320.35
7.0.40.0070.06320.15
7.0.30.0100.08020.18
7.0.20.0000.09020.15
7.0.10.0000.04020.04
7.0.00.0100.05320.11
5.6.280.0070.07320.86
5.6.250.0070.07720.58
5.6.240.0100.04020.55
5.6.230.0000.04720.68
5.6.220.0030.08320.56
5.6.210.0100.05020.56
5.6.200.0100.03321.12
5.6.190.0030.08021.06
5.6.180.0000.04021.12
5.6.170.0000.05321.04
5.6.160.0030.04021.18
5.6.150.0100.07021.12
5.6.140.0100.05021.05
5.6.130.0100.03321.03
5.6.120.0030.03721.14
5.6.110.0030.03721.11
5.6.100.0070.06021.10
5.6.90.0130.07321.13
5.6.80.0130.05720.41
5.6.70.0030.05720.49
5.6.60.0000.04020.49
5.6.50.0030.07020.39
5.6.40.0170.07020.37
5.6.30.0030.03720.55
5.6.20.0030.04020.38
5.6.10.0030.08020.40
5.6.00.0000.08320.29
5.5.380.0030.06020.36
5.5.370.0030.07020.38
5.5.360.0100.07320.41
5.5.350.0070.03320.48
5.5.340.0200.06020.93
5.5.330.0070.08020.77
5.5.320.0130.07720.81
5.5.310.0070.07020.64
5.5.300.0030.03720.89
5.5.290.0100.07720.81
5.5.280.0000.04720.88
5.5.270.0030.06720.81
5.5.260.0070.07720.78
5.5.250.0100.03020.75
5.5.240.0030.03320.29
5.5.230.0000.04320.27
5.5.220.0230.05320.29
5.5.210.0070.04720.25
5.5.200.0070.05020.27
5.5.190.0000.06720.24
5.5.180.0030.03320.14
5.5.160.0000.07020.13
5.5.150.0030.04020.27
5.5.140.0100.07020.29
5.5.130.0100.07320.26
5.5.120.0070.07020.26
5.5.110.0000.08720.23
5.5.100.0070.07320.11
5.5.90.0070.03320.08
5.5.80.0130.05719.94
5.5.70.0070.08320.18
5.5.60.0030.03319.97
5.5.50.0130.06020.16
5.5.40.0030.03320.17
5.5.30.0070.07320.10
5.5.20.0070.03320.00
5.5.10.0130.06319.99
5.5.00.0000.03720.06
5.4.450.0070.06319.38
5.4.440.0170.03319.51
5.4.430.0030.08019.36
5.4.420.0030.04319.50
5.4.410.0100.02719.33
5.4.400.0030.06019.10
5.4.390.0070.06018.93
5.4.380.0030.03719.10
5.4.370.0100.03019.10
5.4.360.0030.04019.16
5.4.350.0070.03019.16
5.4.340.0030.04719.19
5.4.320.0070.05719.16
5.4.310.0000.08019.09
5.4.300.0070.06319.07
5.4.290.0030.07719.04
5.4.280.0000.05318.88
5.4.270.0070.07318.87
5.4.260.0000.04318.90
5.4.250.0130.07018.90
5.4.240.0070.08019.09
5.4.230.0030.03019.13
5.4.220.0030.06719.04
5.4.210.0100.06319.17
5.4.200.0030.06719.22
5.4.190.0070.07718.89
5.4.180.0070.03019.02
5.4.170.0100.06319.03
5.4.160.0070.03719.14
5.4.150.0030.05019.23
5.4.140.0030.03716.37
5.4.130.0030.03716.45
5.4.120.0030.03716.39
5.4.110.0030.03016.56
5.4.100.0030.03716.49
5.4.90.0000.03716.30
5.4.80.0070.03016.40
5.4.70.0030.03716.46
5.4.60.0030.04016.25
5.4.50.0000.03316.31
5.4.40.0000.04016.39
5.4.30.0100.02316.41
5.4.20.0070.04316.36
5.4.10.0030.03316.25
5.4.00.0030.03015.66
5.3.290.0170.06714.60
5.3.280.0070.05714.66
5.3.270.0070.07014.65
5.3.260.0030.04314.62
5.3.250.0030.04014.71
5.3.240.0070.03314.62
5.3.230.0030.03714.67
5.3.220.0000.04014.59
5.3.210.0070.03014.50
5.3.200.0070.03314.64
5.3.190.0030.03314.61
5.3.180.0030.03714.50
5.3.170.0030.04714.59
5.3.160.0000.03714.63
5.3.150.0030.03314.60
5.3.140.0000.03714.64
5.3.130.0030.03014.66
5.3.120.0000.03714.61
5.3.110.0030.03714.63
5.3.100.0070.03314.08
5.3.90.0070.02714.11
5.3.80.0000.04014.05
5.3.70.0030.03014.14
5.3.60.0070.03013.93
5.3.50.0030.03014.02
5.3.40.0030.03713.99
5.3.30.0000.04313.98
5.3.20.0070.03313.71
5.3.10.0000.03013.73
5.3.00.0030.07313.69
5.2.170.0000.03011.32
5.2.160.0100.05011.32
5.2.150.0030.03011.32
5.2.140.0030.02311.32
5.2.130.0030.05011.32
5.2.120.0070.04311.32
5.2.110.0130.05311.32
5.2.100.0000.02711.32
5.2.90.0000.06311.32
5.2.80.0070.06011.32
5.2.70.0000.02711.32
5.2.60.0100.03311.32
5.2.50.0000.02711.32
5.2.40.0070.05711.32
5.2.30.0000.02711.32
5.2.20.0030.05311.32
5.2.10.0070.03311.32
5.2.00.0030.06011.32
5.1.60.0000.03011.32
5.1.50.0000.03011.32
5.1.40.0030.04711.32
5.1.30.0000.06011.32
5.1.20.0000.02711.32
5.1.10.0070.05011.32
5.1.00.0070.04011.32
5.0.50.0030.02711.32
5.0.40.0000.01711.32
5.0.30.0000.04311.32
5.0.20.0030.02711.32
5.0.10.0000.02011.32
5.0.00.0070.06311.32
4.4.90.0100.02711.32
4.4.80.0000.03311.32
4.4.70.0000.02011.32
4.4.60.0000.02311.32
4.4.50.0000.02311.32
4.4.40.0030.03711.32
4.4.30.0000.04011.32
4.4.20.0030.03311.32
4.4.10.0000.01711.32
4.4.00.0030.04711.32
4.3.110.0000.01311.32
4.3.100.0000.01311.32
4.3.90.0030.02311.32
4.3.80.0000.04311.32
4.3.70.0030.01011.32
4.3.60.0000.01711.32
4.3.50.0030.02711.32
4.3.40.0030.04311.32
4.3.30.0070.02711.32
4.3.20.0000.03311.32
4.3.10.0000.01711.32
4.3.00.0030.03011.32

preferences:
56.6 ms | 401 KiB | 5 Q