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)
8.3.60.0040.01118.30
8.3.50.0160.00521.21
8.3.40.0060.01218.82
8.3.30.0100.01022.05
8.3.20.0090.00620.10
8.3.10.0080.00022.09
8.3.00.0000.00922.30
8.2.180.0040.01116.38
8.2.170.0140.00022.96
8.2.160.0060.00822.23
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0070.01126.16
8.2.120.0070.00020.88
8.2.110.0060.00322.38
8.2.100.0070.00417.78
8.2.90.0040.00419.05
8.2.80.0040.00419.23
8.2.70.0030.00517.63
8.2.60.0050.00317.80
8.2.50.0030.00618.07
8.2.40.0000.00818.09
8.2.30.0030.00519.47
8.2.20.0000.00817.87
8.2.10.0040.00417.80
8.2.00.0030.00617.77
8.1.280.0110.00825.92
8.1.270.0000.00823.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0070.00719.17
8.1.220.0000.00817.75
8.1.210.0040.00418.77
8.1.200.0100.00017.47
8.1.190.0000.00817.43
8.1.180.0000.00818.10
8.1.170.0030.00518.55
8.1.160.0050.00318.92
8.1.150.0000.00718.79
8.1.140.0040.00417.59
8.1.130.0040.00417.93
8.1.120.0030.00517.66
8.1.110.0030.00317.61
8.1.100.0000.00717.61
8.1.90.0040.00417.62
8.1.80.0070.00017.63
8.1.70.0000.00817.60
8.1.60.0060.00317.59
8.1.50.0040.00717.56
8.1.40.0050.00317.73
8.1.30.0000.00717.74
8.1.20.0000.00717.77
8.1.10.0000.00717.63
8.1.00.0040.00417.48
8.0.300.0090.00018.77
8.0.290.0030.00617.16
8.0.280.0050.00318.37
8.0.270.0000.00717.29
8.0.260.0000.00618.47
8.0.250.0060.00317.00
8.0.240.0050.00317.09
8.0.230.0030.00516.93
8.0.220.0070.00016.90
8.0.210.0000.00717.12
8.0.200.0000.00817.16
8.0.190.0000.00817.10
8.0.180.0040.00417.03
8.0.170.0090.00017.02
8.0.160.0040.00417.14
8.0.150.0000.00816.84
8.0.140.0080.00016.96
8.0.130.0000.00513.51
8.0.120.0030.00517.01
8.0.110.0080.00016.93
8.0.100.0040.00417.04
8.0.90.0070.00017.06
8.0.80.0030.01417.00
8.0.70.0040.00416.97
8.0.60.0000.00717.00
8.0.50.0040.00416.75
8.0.30.0130.00617.43
8.0.20.0170.00817.40
8.0.10.0000.00717.09
8.0.00.0130.00716.90
7.4.330.0000.00516.68
7.4.320.0050.00216.56
7.4.300.0060.00016.58
7.4.290.0030.00316.67
7.4.280.0030.00316.63
7.4.270.0000.00816.76
7.4.260.0000.00513.32
7.4.250.0000.00816.71
7.4.240.0050.00216.66
7.4.230.0070.00016.47
7.4.220.0130.01416.63
7.4.210.0080.00716.69
7.4.200.0030.00316.78
7.4.190.0000.00716.71
7.4.160.0060.00916.61
7.4.150.0100.00717.40
7.4.140.0160.00917.86
7.4.130.0110.00516.75
7.4.120.0110.00916.64
7.4.110.0030.01616.57
7.4.100.0100.00716.80
7.4.90.0080.01216.78
7.4.80.0090.00919.39
7.4.70.0100.00616.74
7.4.60.0070.01016.67
7.4.50.0040.00416.58
7.4.40.0040.01122.77
7.4.30.0090.01316.50
7.4.00.0060.01015.06
7.3.330.0000.00513.20
7.3.320.0000.00613.17
7.3.310.0000.00716.31
7.3.300.0050.00316.31
7.3.290.0120.00316.39
7.3.280.0100.00716.40
7.3.270.0060.01117.40
7.3.260.0100.01016.47
7.3.250.0100.00816.57
7.3.240.0100.00716.61
7.3.230.0100.00716.46
7.3.210.0090.00616.29
7.3.200.0080.00819.39
7.3.190.0070.01616.73
7.3.180.0100.00616.60
7.3.170.0060.00916.40
7.3.160.0100.00716.66
7.3.120.0100.00315.05
7.2.330.0110.00616.83
7.2.320.0120.00616.55
7.2.310.0070.01016.93
7.2.300.0110.01116.82
7.2.290.0090.00916.65
7.2.00.0030.01219.27
7.1.100.0030.01018.39
7.1.70.0030.00717.28
7.1.60.0080.01519.21
7.1.50.0240.01017.00
7.1.00.0030.03322.38
7.0.200.0000.00916.63
7.0.140.0000.08021.97
7.0.100.0130.07719.96
7.0.90.0100.07719.98
7.0.80.0030.08720.02
7.0.70.0200.07019.86
7.0.60.0030.08320.06
7.0.50.0100.07320.25
7.0.40.0100.08320.13
7.0.30.0100.08020.00
7.0.20.0070.07320.10
7.0.10.0170.06320.03
7.0.00.0270.03020.02
5.6.280.0100.06721.03
5.6.250.0070.04020.62
5.6.240.0030.09020.65
5.6.230.0070.05020.70
5.6.220.0100.08020.73
5.6.210.0000.08720.60
5.6.200.0230.07021.03
5.6.190.0130.07021.04
5.6.180.0100.07321.16
5.6.170.0100.06021.03
5.6.160.0070.04721.07
5.6.150.0070.06021.12
5.6.140.0000.05321.01
5.6.130.0100.07321.15
5.6.120.0170.07320.95
5.6.110.0070.06021.08
5.6.100.0070.08020.98
5.6.90.0070.08321.01
5.6.80.0100.07720.30
5.6.70.0130.07320.30
5.6.60.0030.08320.38
5.6.50.0030.07020.32
5.6.40.0070.08020.41
5.6.30.0070.07720.36
5.6.20.0030.08020.48
5.6.10.0070.06020.45
5.6.00.0170.06320.29
5.5.380.0070.07720.36
5.5.370.0030.04720.41
5.5.360.0100.07720.40
5.5.350.0030.08020.33
5.5.340.0070.08720.84
5.5.330.0100.08320.88
5.5.320.0070.08320.86
5.5.310.0070.07720.81
5.5.300.0030.06320.77
5.5.290.0170.07720.78
5.5.280.0100.08320.85
5.5.270.0100.04020.85
5.5.260.0100.07320.76
5.5.250.0130.07320.53
5.5.240.0200.06720.14
5.5.230.0030.08020.13
5.5.220.0070.08020.14
5.5.210.0100.05020.16
5.5.200.0170.07020.17
5.5.190.0100.08720.18
5.5.180.0130.07320.08
5.5.160.0200.06020.20
5.5.150.0030.08020.22
5.5.140.0070.06320.17
5.5.130.0070.07020.20
5.5.120.0030.08320.25
5.5.110.0100.04720.23
5.5.100.0130.06720.02
5.5.90.0130.04720.03
5.5.80.0070.06720.03
5.5.70.0130.07020.15
5.5.60.0030.07720.02
5.5.50.0030.04720.09
5.5.40.0070.05019.99
5.5.30.0130.06719.92
5.5.20.0130.06719.93
5.5.10.0200.06720.04
5.5.00.0130.06320.02
5.4.450.0130.07019.35
5.4.440.0070.04719.46
5.4.430.0030.08019.38
5.4.420.0070.06719.56
5.4.410.0130.07019.00
5.4.400.0130.07319.12
5.4.390.0070.07718.94
5.4.380.0030.08318.96
5.4.370.0170.06719.04
5.4.360.0070.07319.04
5.4.350.0070.06718.98
5.4.340.0130.06319.18
5.4.320.0100.04318.94
5.4.310.0100.07318.80
5.4.300.0000.05718.98
5.4.290.0030.07319.02
5.4.280.0100.07319.04
5.4.270.0200.06019.13
5.4.260.0130.07318.94
5.4.250.0130.03719.09
5.4.240.0030.05719.01
5.4.230.0130.04719.03
5.4.220.0100.06319.05
5.4.210.0100.07718.93
5.4.200.0200.06318.82
5.4.190.0030.07719.00
5.4.180.0100.07719.02
5.4.170.0200.06318.97
5.4.160.0130.07019.09
5.4.150.0070.08319.21
5.4.140.0170.05316.27
5.4.130.0100.06016.26
5.4.120.0200.06016.36
5.4.110.0070.04016.36
5.4.100.0070.07316.30
5.4.90.0100.03316.21
5.4.80.0070.07016.41
5.4.70.0070.07316.23
5.4.60.0100.06316.38
5.4.50.0070.07016.38
5.4.40.0100.07316.29
5.4.30.0070.07716.38
5.4.20.0100.07316.30
5.4.10.0100.07316.40
5.4.00.0070.04015.72
5.3.290.0070.08015.72
5.3.280.0030.07015.72
5.3.270.0030.07015.72
5.3.260.0070.03715.72
5.3.250.0130.07315.72
5.3.240.0100.07715.72
5.3.230.0030.05715.72
5.3.220.0030.08715.72
5.3.210.0030.08715.72
5.3.200.0100.06715.72
5.3.190.0000.04015.72
5.3.180.0070.05715.72
5.3.170.0030.07015.72
5.3.160.0030.05715.72
5.3.150.0070.04015.72
5.3.140.0100.07015.72
5.3.130.0170.06315.72
5.3.120.0100.07315.72
5.3.110.0030.08015.72
5.3.100.0100.06315.72
5.3.90.0130.03315.72
5.3.80.0030.07715.72
5.3.70.0170.05315.72
5.3.60.0070.04315.72
5.3.50.0100.05015.72
5.3.40.0070.06015.72
5.3.30.0030.05715.72
5.3.20.0130.05015.72
5.3.10.0070.07315.72
5.3.00.0170.05015.72
5.2.170.0070.06015.72
5.2.160.0070.05315.72
5.2.150.0000.03715.72
5.2.140.0000.06315.72
5.2.130.0030.06715.72
5.2.120.0100.04315.72
5.2.110.0030.05715.72
5.2.100.0030.04715.72
5.2.90.0030.03715.72
5.2.80.0100.06015.72
5.2.70.0100.05715.72
5.2.60.0070.05715.72
5.2.50.0100.05315.72
5.2.40.0000.06315.72
5.2.30.0000.06315.72
5.2.20.0030.05715.72
5.2.10.0030.05315.72
5.2.00.0030.06315.72
5.1.60.0030.04715.72
5.1.50.0070.04315.72
5.1.40.0100.05015.72
5.1.30.0030.05715.72
5.1.20.0070.05315.72
5.1.10.0070.04315.72
5.1.00.0070.04015.72
5.0.50.0000.05015.72
5.0.40.0030.03715.72
5.0.30.0030.06715.72
5.0.20.0030.04315.72
5.0.10.0030.04015.72
5.0.00.0030.03715.72
4.4.90.0100.02715.72
4.4.80.0070.03015.72
4.4.70.0000.03015.72
4.4.60.0000.03715.72
4.4.50.0000.03715.72
4.4.40.0030.02715.72
4.4.30.0100.02715.72
4.4.20.0000.03715.72
4.4.10.0000.02315.72
4.4.00.0100.03715.72
4.3.110.0030.03015.72
4.3.100.0070.03015.72
4.3.90.0030.01715.72
4.3.80.0030.05015.72
4.3.70.0000.03015.72
4.3.60.0070.02315.72
4.3.50.0000.02015.72
4.3.40.0000.04015.72
4.3.30.0030.01715.72
4.3.20.0000.03715.72
4.3.10.0030.02715.72
4.3.00.0000.02015.72

preferences:
41.79 ms | 401 KiB | 5 Q