3v4l.org

run code in 300+ PHP versions simultaneously
<?php $template = ' <div style="border:1px solid blue;padding:10px;"> <h1>[item_title]</h1> <p>[item_text]</p> <a href="[item_link]">[item_link]</a> </div> <div style="border:1px solid blue;padding:10px;"> <h1>[item_title]</h1> <p>[item_text]</p> <a href="[item_link]">[item_link]</a> </div> '; /// ITEM 1 $title = 'title 1'; $text = 'text text text'; $link = 'http://www.google.com'; /// ITEM 2 $title = 'title 2'; $text = 'text2 text2 text2'; $link = 'http://www.google.com'; $regex = array( '/\[\item_text\]/is' => $text, '/\[\item_link\]/is' => $link, '/\[\item_title\]/is' => $title ); foreach($regex as $keys => $values) { $template = preg_replace($keys, $values, $template); } echo $template;

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.0110.00418.68
8.3.50.0160.00221.20
8.3.40.0150.00618.92
8.3.30.0120.00419.05
8.3.20.0000.00820.16
8.3.10.0040.00422.09
8.3.00.0050.00220.82
8.2.180.0130.00616.75
8.2.170.0100.00722.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0140.00426.16
8.2.120.0080.00019.66
8.2.110.0070.00320.46
8.2.100.0110.00017.97
8.2.90.0000.00818.98
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0110.00017.77
8.2.50.0060.00318.10
8.2.40.0000.00720.52
8.2.30.0050.00319.32
8.2.20.0050.00217.74
8.2.10.0050.00317.86
8.2.00.0060.00617.80
8.1.280.0100.00325.92
8.1.270.0050.00318.70
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00721.37
8.1.230.0090.00320.21
8.1.220.0070.00017.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0050.00317.00
8.1.180.0070.00018.10
8.1.170.0060.00318.54
8.1.160.0070.00018.81
8.1.150.0020.00520.07
8.1.140.0000.00717.45
8.1.130.0000.00817.75
8.1.120.0030.00517.35
8.1.110.0090.00017.43
8.1.100.0040.00417.50
8.1.90.0070.00017.43
8.1.80.0030.00517.39
8.1.70.0030.00317.43
8.1.60.0040.00417.48
8.1.50.0060.00317.52
8.1.40.0050.00317.43
8.1.30.0000.00717.61
8.1.20.0040.00417.66
8.1.10.0030.00517.50
8.1.00.0040.00417.57
8.0.300.0040.00419.02
8.0.290.0040.00416.75
8.0.280.0080.00018.51
8.0.270.0080.00017.29
8.0.260.0040.00416.76
8.0.250.0000.00617.03
8.0.240.0090.00017.02
8.0.230.0080.00016.90
8.0.220.0030.00316.86
8.0.210.0070.00016.95
8.0.200.0060.00017.07
8.0.190.0000.00717.00
8.0.180.0000.00716.88
8.0.170.0030.00516.96
8.0.160.0040.00416.93
8.0.150.0040.00416.97
8.0.140.0040.00416.81
8.0.130.0030.00313.39
8.0.120.0040.00416.83
8.0.110.0040.00416.95
8.0.100.0070.00016.86
8.0.90.0040.00416.86
8.0.80.0100.01016.95
8.0.70.0040.00416.92
8.0.60.0080.00016.98
8.0.50.0040.00417.03
8.0.30.0090.00917.01
8.0.20.0100.01217.40
8.0.10.0040.00416.96
8.0.00.0110.00716.97
7.4.330.0050.00015.00
7.4.320.0030.00316.71
7.4.300.0030.00316.74
7.4.290.0000.00716.89
7.4.280.0070.00416.73
7.4.270.0060.00316.77
7.4.260.0030.00516.78
7.4.250.0040.00416.83
7.4.240.0040.00316.71
7.4.230.0030.00316.74
7.4.220.0090.00816.89
7.4.210.0070.00916.79
7.4.200.0000.00716.68
7.4.190.0070.00016.97
7.4.160.0120.00616.47
7.4.150.0120.00917.40
7.4.140.0140.00417.86
7.4.130.0130.00816.77
7.4.120.0100.00716.62
7.4.110.0070.01316.60
7.4.100.0160.00416.66
7.4.90.0100.01016.66
7.4.80.0030.01519.39
7.4.70.0060.01616.71
7.4.60.0090.01016.63
7.4.50.0030.00316.69
7.4.40.0030.01422.77
7.4.30.0130.00616.60
7.4.00.0000.01314.99
7.3.330.0030.00313.34
7.3.320.0050.00013.39
7.3.310.0040.00416.56
7.3.300.0000.00716.47
7.3.290.0000.01316.54
7.3.280.0090.00916.55
7.3.270.0170.00017.40
7.3.260.0140.00416.47
7.3.250.0120.00816.63
7.3.240.0110.01116.63
7.3.230.0080.01116.51
7.3.210.0030.01316.75
7.3.200.0070.01019.39
7.3.190.0060.01216.55
7.3.180.0090.00916.38
7.3.170.0090.01216.45
7.3.160.0030.01316.36
7.3.120.0120.00615.30
7.2.330.0030.01316.88
7.2.320.0040.01616.82
7.2.310.0070.01716.84
7.2.300.0160.00616.73
7.2.290.0060.00916.73
7.2.60.0060.00917.00
7.2.00.0000.01518.98
7.1.200.0040.00816.16
7.1.100.0060.00618.29
7.1.70.0040.00817.15
7.1.60.0070.01819.82
7.1.50.0160.00617.31
7.1.00.0130.06022.34
7.0.200.0060.00616.68
7.0.140.0070.06322.00
7.0.60.0070.05719.93
7.0.50.0070.08017.83
7.0.40.0100.03720.07
7.0.30.0430.06020.20
7.0.20.0100.05020.30
7.0.10.0100.08720.11
7.0.00.0200.06720.11
5.6.280.0070.07021.14
5.6.210.0130.07020.69
5.6.200.0030.04018.09
5.6.190.0030.04320.43
5.6.180.0400.04720.41
5.6.170.0170.04320.54
5.6.160.0170.07320.49
5.6.150.0030.04318.21
5.6.140.0070.05018.11
5.6.130.0030.08018.17
5.6.120.0130.08020.96
5.6.110.0100.07721.07
5.6.100.0030.04021.09
5.6.90.0030.04321.09
5.6.80.0070.06720.35
5.5.350.0030.08020.30
5.5.340.0070.07717.98
5.5.330.0070.07020.40
5.5.320.0030.04720.29
5.5.310.0330.07720.17
5.5.300.0030.06717.94
5.5.290.0130.07318.01
5.5.280.0100.06020.98
5.5.270.0130.05020.86
5.5.260.0130.08320.73
5.5.250.0070.08320.56
5.5.240.0100.07320.17
5.4.450.0170.03719.12
5.4.440.0230.03319.41
5.4.430.0170.04319.25
5.4.420.0130.04019.41
5.4.410.0130.03719.45
5.4.400.0100.04019.14
5.4.390.0170.03319.26
5.4.380.0130.03719.16
5.4.370.0200.03719.24
5.4.360.0300.05319.13
5.4.350.0230.07718.93
5.4.340.0170.07719.11
5.4.320.0200.05718.92
5.4.310.0270.04019.09
5.4.300.0230.07718.78
5.4.290.0170.07018.78
5.4.280.0270.05319.14
5.4.270.0200.07719.08
5.4.260.0270.06719.08
5.4.250.0130.04719.09
5.4.240.0200.07319.09
5.4.230.0200.05719.08
5.4.220.0330.06719.06
5.4.210.0270.07019.08
5.4.200.0270.06318.87
5.4.190.0330.04319.07
5.4.180.0200.04719.07
5.4.170.0300.06018.92
5.4.160.0330.06719.11
5.4.150.0200.06018.77
5.4.140.0370.05316.50
5.4.130.0200.05316.23
5.4.120.0200.05316.27
5.4.110.0230.07016.44
5.4.100.0270.04716.26
5.4.90.0270.06316.44
5.4.80.0270.05016.52
5.4.70.0300.06316.29
5.4.60.0200.04016.37
5.4.50.0330.06316.41
5.4.40.0330.06316.36
5.4.30.0300.03716.47
5.4.20.0170.06316.37
5.4.10.0270.07016.17
5.4.00.0230.07015.80
5.3.290.0230.05014.64
5.3.280.0230.07314.64
5.3.270.0230.07314.66
5.3.260.0300.07014.64
5.3.250.0230.05714.64
5.3.240.0200.06014.64
5.3.230.0270.04714.64
5.3.220.0270.06314.64
5.3.210.0370.06014.64
5.3.200.0130.05714.64
5.3.190.0200.04314.64
5.3.180.0200.04014.64
5.3.170.0330.05314.64
5.3.160.0270.04714.64
5.3.150.0200.07714.64
5.3.140.0200.07014.64
5.3.130.0370.04014.64
5.3.120.0300.06714.64
5.3.110.0230.07314.64
5.3.100.0300.06714.64
5.3.90.0270.06014.64
5.3.80.0230.06314.64
5.3.70.0230.04314.64
5.3.60.0300.06714.64
5.3.50.0230.05314.64
5.3.40.0270.04714.64
5.3.30.0300.03714.64
5.3.20.0300.06714.64
5.3.10.0230.03714.64
5.3.00.0270.05714.64
5.2.170.0230.06014.64
5.2.160.0170.04714.64
5.2.150.0230.06014.64
5.2.140.0270.05314.64
5.2.130.0200.03314.64
5.2.120.0200.04314.64
5.2.110.0200.05014.64
5.2.100.0170.06014.64
5.2.90.0200.06014.64
5.2.80.0200.06314.64
5.2.70.0230.05314.64
5.2.60.0270.05314.64
5.2.50.0300.05014.64
5.2.40.0170.06014.64
5.2.30.0100.06714.64
5.2.20.0100.06714.64
5.2.10.0170.05014.64
5.2.00.0200.05714.64
5.1.60.0130.05014.64
5.1.50.0170.05314.64
5.1.40.0170.03714.64
5.1.30.0170.05714.64
5.1.20.0170.05014.64
5.1.10.0230.03714.64
5.1.00.0170.05714.64
5.0.50.0100.03014.64
5.0.40.0100.04014.64
5.0.30.0130.06014.64
5.0.20.0070.03314.64
5.0.10.0100.03014.64
5.0.00.0070.04714.64
4.4.90.0030.02714.64
4.4.80.0070.03314.64
4.4.70.0100.03014.64
4.4.60.0100.01714.64
4.4.50.0070.03314.64
4.4.40.0070.05314.64
4.4.30.0000.02714.64
4.4.20.0100.02714.64
4.4.10.0070.04014.64
4.4.00.0030.05314.64
4.3.110.0030.03314.64
4.3.100.0070.02714.64
4.3.90.0100.02314.64
4.3.80.0100.03714.64
4.3.70.0130.02714.64
4.3.60.0070.03314.64
4.3.50.0030.03314.64
4.3.40.0100.04314.64
4.3.30.0070.03314.64
4.3.20.0030.03314.64
4.3.10.0030.02714.64
4.3.00.0070.02314.64

preferences:
48.94 ms | 400 KiB | 5 Q