3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'choukai kai hey this matches too 423-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)
8.3.60.0100.00718.43
8.3.50.0100.00921.33
8.3.40.0070.00718.82
8.3.30.0120.00320.30
8.3.20.0080.00820.29
8.3.10.0050.00322.09
8.3.00.0050.00322.58
8.2.180.0000.01416.38
8.2.170.0140.00022.96
8.2.160.0050.00822.21
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0090.00026.16
8.2.120.0040.00420.69
8.2.110.0090.00022.37
8.2.100.0040.00817.91
8.2.90.0040.00419.21
8.2.80.0000.00719.11
8.2.70.0030.00717.63
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0000.00818.15
8.2.30.0030.00519.33
8.2.20.0040.00417.82
8.2.10.0000.00717.98
8.2.00.0000.01117.80
8.1.280.0120.00925.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.00923.93
8.1.230.0000.01119.22
8.1.220.0030.00517.78
8.1.210.0030.00518.77
8.1.200.0090.00017.50
8.1.190.0030.00517.55
8.1.180.0080.00018.10
8.1.170.0080.00018.66
8.1.160.0080.00018.92
8.1.150.0070.00018.71
8.1.140.0040.00417.55
8.1.130.0000.00717.89
8.1.120.0040.00417.52
8.1.110.0000.00717.66
8.1.100.0050.00317.52
8.1.90.0000.00817.57
8.1.80.0000.00717.64
8.1.70.0040.00417.50
8.1.60.0040.00417.65
8.1.50.0060.00317.70
8.1.40.0060.00317.69
8.1.30.0080.00017.73
8.1.20.0050.00317.81
8.1.10.0040.00417.57
8.1.00.0080.00017.46
8.0.300.0070.00018.77
8.0.290.0000.00717.28
8.0.280.0030.00318.39
8.0.270.0000.00717.36
8.0.260.0000.00717.02
8.0.250.0040.00417.13
8.0.240.0000.00817.11
8.0.230.0000.00717.05
8.0.220.0030.00317.00
8.0.210.0030.00317.10
8.0.200.0050.00317.20
8.0.190.0080.00017.16
8.0.180.0000.00717.04
8.0.170.0000.00816.95
8.0.160.0030.00317.07
8.0.150.0040.00416.88
8.0.140.0040.00417.02
8.0.130.0030.00313.44
8.0.120.0000.00916.88
8.0.110.0000.00817.09
8.0.100.0040.00417.15
8.0.90.0000.00717.06
8.0.80.0060.01417.07
8.0.70.0000.00716.90
8.0.60.0000.00716.80
8.0.50.0040.00416.99
8.0.30.0150.00617.20
8.0.20.0130.01017.40
8.0.10.0040.00417.10
8.0.00.0100.00716.92
7.4.330.0000.00516.68
7.4.320.0000.00616.64
7.4.300.0060.00016.75
7.4.290.0040.00416.66
7.4.280.0000.00716.73
7.4.270.0050.00316.65
7.4.260.0000.00513.44
7.4.250.0060.00316.53
7.4.240.0030.00316.70
7.4.230.0030.00316.47
7.4.220.0120.00616.60
7.4.210.0100.00916.73
7.4.200.0040.00416.86
7.4.190.0070.00016.80
7.4.160.0080.00816.63
7.4.150.0060.01217.40
7.4.140.0110.00617.86
7.4.130.0110.00716.63
7.4.120.0110.00816.71
7.4.110.0130.00916.68
7.4.100.0090.00916.54
7.4.90.0120.00616.72
7.4.80.0080.00819.39
7.4.70.0080.00816.77
7.4.60.0130.00316.70
7.4.50.0000.00716.53
7.4.40.0000.01622.77
7.4.30.0090.00816.57
7.4.00.0030.01415.21
7.3.330.0020.00213.08
7.3.320.0000.00713.24
7.3.310.0030.00416.50
7.3.300.0000.00816.38
7.3.290.0070.00716.41
7.3.280.0070.00816.37
7.3.270.0070.01117.40
7.3.260.0130.01016.67
7.3.250.0110.00716.41
7.3.240.0160.00016.36
7.3.230.0080.00816.61
7.3.210.0080.00816.71
7.3.200.0100.00719.39
7.3.190.0000.01616.46
7.3.180.0070.01416.52
7.3.170.0060.00916.63
7.3.160.0040.01416.38
7.3.120.0000.01615.16
7.3.10.0030.00916.58
7.3.00.0060.01016.31
7.2.330.0080.01116.75
7.2.320.0040.01316.45
7.2.310.0120.00616.59
7.2.300.0130.00316.71
7.2.290.0090.00916.84
7.2.130.0110.01116.63
7.2.120.0200.01017.02
7.2.110.0170.00717.02
7.2.100.0060.00916.52
7.2.90.0160.01017.07
7.2.80.0080.01116.95
7.2.70.0170.00816.95
7.2.60.0120.00417.01
7.2.50.0160.00816.94
7.2.40.0070.01316.91
7.2.30.0100.01316.89
7.2.20.0060.00916.94
7.2.10.0070.01116.69
7.2.00.0080.00918.18
7.1.250.0060.01515.71
7.1.200.0030.01015.79
7.1.100.0060.00618.38
7.1.70.0000.00717.24
7.1.60.0070.01719.21
7.1.50.0110.01417.08
7.1.00.0000.04022.32
7.0.200.0050.00216.80
7.0.140.0100.06322.00
7.0.100.0070.05719.97
7.0.90.0270.07720.01
7.0.80.0400.06719.98
7.0.70.0100.05719.84
7.0.60.0100.04019.80
7.0.50.0330.08320.34
7.0.40.0200.07320.00
7.0.30.0130.07320.10
7.0.20.0030.05320.08
7.0.10.0100.08020.04
7.0.00.0100.08719.99
5.6.280.0130.06321.04
5.6.250.0070.08720.62
5.6.240.0130.08020.50
5.6.230.0100.08020.59
5.6.220.0200.06720.72
5.6.210.0030.05020.64
5.6.200.0030.05021.08
5.6.190.0270.06720.99
5.6.180.0100.05021.03
5.6.170.0030.05021.04
5.6.160.0170.07721.11
5.6.150.0100.08021.08
5.6.140.0070.06720.99
5.6.130.0130.08321.00
5.6.120.0070.04721.16
5.6.110.0130.07721.04
5.6.100.0170.04321.12
5.6.90.0130.08021.00
5.6.80.0070.07720.34
5.6.70.0070.08320.51
5.6.60.0200.06320.41
5.6.50.0070.04320.39
5.6.40.0130.08320.53
5.6.30.0070.07320.36
5.6.20.0130.07320.32
5.6.10.0070.06020.43
5.6.00.0070.08020.29
5.5.380.0030.06320.37
5.5.370.0030.08720.30
5.5.360.0070.08020.36
5.5.350.0000.08320.33
5.5.340.0100.04020.86
5.5.330.0070.06720.80
5.5.320.0170.07020.89
5.5.310.0130.07020.89
5.5.300.0200.07020.63
5.5.290.0000.05720.62
5.5.280.0100.08020.88
5.5.270.0170.07320.73
5.5.260.0170.07320.77
5.5.250.0100.04020.63
5.5.240.0130.06720.28
5.5.230.0130.07720.29
5.5.220.0070.07320.27
5.5.210.0030.05720.20
5.5.200.0030.05320.24
5.5.190.0030.05320.24
5.5.180.0130.04320.22
5.5.160.0030.08020.18
5.5.150.0030.08020.14
5.5.140.0170.06020.25
5.5.130.0130.05720.20
5.5.120.0070.06720.23
5.5.110.0030.06720.10
5.5.100.0030.08020.01
5.5.90.0070.04320.10
5.5.80.0070.05720.00
5.5.70.0070.07720.09
5.5.60.0070.06320.00
5.5.50.0200.05320.14
5.5.40.0070.07320.13
5.5.30.0170.06320.05
5.5.20.0030.06720.05
5.5.10.0000.04319.95
5.5.00.0070.08020.11
5.4.450.0100.07719.14
5.4.440.0070.08319.27
5.4.430.0070.08019.36
5.4.420.0200.07019.43
5.4.410.0030.07318.98
5.4.400.0170.06318.97
5.4.390.0070.07719.12
5.4.380.0170.05719.12
5.4.370.0030.05718.96
5.4.360.0170.04018.81
5.4.350.0070.05019.11
5.4.340.0100.06719.10
5.4.320.0030.07719.02
5.4.310.0000.08719.12
5.4.300.0130.07018.80
5.4.290.0130.06319.13
5.4.280.0000.07318.96
5.4.270.0000.04319.09
5.4.260.0000.04718.80
5.4.250.0070.06719.05
5.4.240.0030.04719.09
5.4.230.0070.06719.11
5.4.220.0270.06019.02
5.4.210.0100.07319.02
5.4.200.0030.06718.78
5.4.190.0030.04719.21
5.4.180.0100.07318.97
5.4.170.0070.04319.23
5.4.160.0070.07018.95
5.4.150.0100.07319.03
5.4.140.0070.03016.24
5.4.130.0070.07716.31
5.4.120.0030.08016.23
5.4.110.0100.03016.38
5.4.100.0070.07316.22
5.4.90.0100.04716.32
5.4.80.0100.06016.34
5.4.70.0100.07016.38
5.4.60.0070.07016.41
5.4.50.0100.05316.34
5.4.40.0130.06716.23
5.4.30.0000.06016.18
5.4.20.0130.05016.23
5.4.10.0100.07016.18
5.4.00.0100.07015.77
5.3.290.0100.06314.52
5.3.280.0100.08314.45
5.3.270.0030.07314.58
5.3.260.0130.06314.46
5.3.250.0030.07014.59
5.3.240.0130.06014.55
5.3.230.0070.07314.54
5.3.220.0070.07014.50
5.3.210.0070.04314.53
5.3.200.0200.05714.48
5.3.190.0100.05014.55
5.3.180.0030.06714.52
5.3.170.0030.07314.39
5.3.160.0030.07314.42
5.3.150.0100.07314.55
5.3.140.0100.04014.55
5.3.130.0070.04314.50
5.3.120.0070.06314.41
5.3.110.0070.06714.40
5.3.100.0130.05713.98
5.3.90.0100.06313.83
5.3.80.0100.06714.01
5.3.70.0070.07013.97
5.3.60.0000.04713.98
5.3.50.0030.05013.86
5.3.40.0130.06313.93
5.3.30.0070.05313.84
5.3.20.0030.07313.63
5.3.10.0070.07713.64
5.3.00.0070.06713.41
5.2.170.0000.04712.24
5.2.160.0030.03312.24
5.2.150.0030.05712.24
5.2.140.0100.04712.24
5.2.130.0070.05012.24
5.2.120.0130.05712.24
5.2.110.0130.04712.24
5.2.100.0100.04312.24
5.2.90.0100.05312.24
5.2.80.0070.05712.24
5.2.70.0070.04712.24
5.2.60.0030.03712.24
5.2.50.0000.03012.24
5.2.40.0000.03312.24
5.2.30.0070.03012.24
5.2.20.0070.03012.24
5.2.10.0030.02712.24
5.2.00.0000.03012.24
5.1.60.0000.03012.24
5.1.50.0000.03012.24
5.1.40.0030.02312.24
5.1.30.0000.02712.24
5.1.20.0000.02712.24
5.1.10.0000.02712.24
5.1.00.0030.02712.24
5.0.50.0070.02312.24
5.0.40.0030.01712.24
5.0.30.0030.02712.24
5.0.20.0030.01712.24
5.0.10.0000.03712.24
5.0.00.0030.06012.24
4.4.90.0000.01712.24
4.4.80.0000.01712.24
4.4.70.0070.01312.24
4.4.60.0000.01712.24
4.4.50.0000.01712.24
4.4.40.0000.02712.24
4.4.30.0000.01712.24
4.4.20.0030.01712.24
4.4.10.0000.01712.24
4.4.00.0000.02712.24
4.3.110.0030.01312.24
4.3.100.0000.01712.24
4.3.90.0000.02312.24
4.3.80.0030.02312.24
4.3.70.0000.03712.24
4.3.60.0000.01312.24
4.3.50.0000.03312.24
4.3.40.0030.04712.24
4.3.30.0000.03012.24
4.3.20.0030.03012.24
4.3.10.0030.03012.24
4.3.00.0000.02712.24

preferences:
62.18 ms | 401 KiB | 5 Q