3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compileEchoes($value){ $value = preg_replace ('/\{\{\{\s*(.+?)\s*\}\}\}/s', '<?php echo $1; ?>', $value); return preg_replace ('/\{\{\s*(.+?)\s*\}\}/s', "<?php echo htmlentities($1, ENT_QUOTES, 'UTF-8', false); ?>", $value); } $unescaped = compileEchoes('{{{<strong>Is this bold?</strong>}}}'); echo "<strong>Is this bold?</strong>"; echo "\n"; echo $unescaped; echo "\n"; $that = compileEchoes('{{<strong>Is this bold?</strong>}}'); echo $that; echo "\n"; echo htmlentities('<strong>Is this bold?</strong>', ENT_QUOTES, 'UTF-8', false); ?>

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.0030.01018.56
8.3.50.0080.01321.27
8.3.40.0120.00318.78
8.3.30.0120.00318.83
8.3.20.0080.00018.89
8.3.10.0030.00620.95
8.3.00.0040.00423.65
8.2.180.0040.01216.88
8.2.170.0110.00422.96
8.2.160.0140.00420.47
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0040.00421.23
8.2.110.0030.00621.23
8.2.100.0120.00017.84
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0000.00818.04
8.2.50.0050.00318.10
8.2.40.0040.00418.28
8.2.30.0050.00319.46
8.2.20.0070.00017.69
8.2.10.0000.00817.81
8.2.00.0060.00317.90
8.1.280.0110.00425.92
8.1.270.0180.00023.99
8.1.260.0040.01126.35
8.1.250.0090.00328.09
8.1.240.0030.00622.18
8.1.230.0080.00417.61
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0030.00518.73
8.1.160.0040.00418.89
8.1.150.0060.00318.60
8.1.140.0000.00817.47
8.1.130.0070.00017.74
8.1.120.0030.00517.43
8.1.110.0040.00417.54
8.1.100.0000.00717.51
8.1.90.0000.00717.58
8.1.80.0050.00317.39
8.1.70.0030.00317.54
8.1.60.0030.00517.72
8.1.50.0040.00417.66
8.1.40.0030.00617.50
8.1.30.0000.00817.86
8.1.20.0000.00817.79
8.1.10.0040.00417.62
8.1.00.0040.00417.57
8.0.300.0000.00718.77
8.0.290.0080.00016.88
8.0.280.0040.00418.50
8.0.270.0060.00317.28
8.0.260.0030.00317.03
8.0.250.0040.00417.07
8.0.240.0000.01117.11
8.0.230.0040.00416.91
8.0.220.0030.00317.05
8.0.210.0070.00316.66
8.0.200.0040.00417.06
8.0.190.0050.00216.98
8.0.180.0080.00016.96
8.0.170.0030.00517.04
8.0.160.0050.00316.94
8.0.150.0030.00416.98
8.0.140.0110.00316.96
8.0.130.0030.00313.45
8.0.120.0030.00516.91
8.0.110.0030.00516.93
8.0.100.0000.00716.86
8.0.90.0040.00417.05
8.0.80.0150.00617.02
8.0.70.0000.00717.02
8.0.60.0040.00417.08
8.0.50.0040.00416.80
8.0.30.0100.00817.33
8.0.20.0120.01217.46
8.0.10.0040.00416.90
8.0.00.0100.00716.79
7.4.330.0050.00016.86
7.4.320.0030.00316.65
7.4.300.0000.00716.71
7.4.290.0030.00316.73
7.4.280.0030.00316.80
7.4.270.0000.00716.82
7.4.260.0030.00313.50
7.4.250.0000.00816.83
7.4.240.0030.00316.75
7.4.230.0070.00016.46
7.4.220.0030.01616.68
7.4.210.0080.00716.75
7.4.200.0030.00416.90
7.4.190.0000.00716.81
7.4.160.0130.00316.48
7.4.150.0120.01517.40
7.4.140.0080.01217.86
7.4.130.0090.00916.59
7.4.120.0100.00916.69
7.4.110.0140.00316.73
7.4.100.0070.01116.79
7.4.90.0120.00616.67
7.4.80.0130.01019.39
7.4.70.0100.00716.34
7.4.60.0070.01016.73
7.4.50.0030.00616.79
7.4.40.0070.00522.77
7.4.30.0110.00516.92
7.4.00.0040.00415.00
7.3.330.0060.00013.46
7.3.320.0070.00013.45
7.3.310.0000.00716.32
7.3.300.0030.00316.37
7.3.290.0050.00916.47
7.3.280.0130.00516.45
7.3.270.0130.00717.40
7.3.260.0140.00518.24
7.3.250.0090.00816.50
7.3.240.0100.00716.66
7.3.230.0110.00616.53
7.3.210.0120.00616.71
7.3.200.0130.00519.39
7.3.190.0000.02016.45
7.3.180.0070.01016.64
7.3.170.0140.00816.68
7.3.160.0080.00816.78
7.3.120.0070.01015.02
7.2.330.0100.01416.61
7.2.320.0170.00716.81
7.2.310.0070.01816.80
7.2.300.0060.01216.68
7.2.290.0120.00616.74
7.2.60.0060.00316.85
7.1.200.0000.01415.84
7.1.100.0060.01218.27
7.1.70.0060.00317.46
7.1.60.0110.00017.68
7.1.50.0030.01717.38
7.1.00.0030.07722.42
7.0.200.0000.00716.74
7.0.140.0100.06721.94
7.0.60.0130.08019.95
7.0.50.0130.06017.92
7.0.40.0100.05020.25
7.0.30.0130.04720.21
7.0.20.0370.05320.17
7.0.10.0200.04720.18
7.0.00.0030.06720.31
5.6.280.0100.06720.98
5.6.210.0070.06020.47
5.6.200.0030.06318.29
5.6.190.0070.04720.63
5.6.180.0230.04020.39
5.6.170.0330.07020.64
5.6.160.0100.05320.44
5.6.150.0100.07318.18
5.6.140.0070.08018.19
5.6.130.0170.07018.27
5.6.120.0000.04721.12
5.6.110.0070.05321.07
5.6.100.0130.07020.98
5.6.90.0200.06721.13
5.6.80.0100.07020.41
5.6.70.0200.03320.41
5.5.350.0230.05320.35
5.5.340.0070.05017.99
5.5.330.0100.04720.27
5.5.320.0270.06720.26
5.5.310.0070.05020.23
5.5.300.0100.04318.07
5.5.290.0070.05017.93
5.5.280.0000.05020.64
5.5.270.0070.04020.87
5.5.260.0070.08720.80
5.5.250.0070.08020.69
5.5.240.0030.04020.19
5.4.450.1530.04319.32
5.4.440.1570.03719.35
5.4.430.1500.04319.23
5.4.420.1470.04319.23
5.4.410.0200.07019.25
5.4.400.0300.06718.79
5.4.390.0130.04019.31
5.4.380.0300.05719.08
5.4.370.0130.03719.16
5.4.360.0300.04018.78
5.4.350.0200.03019.16
5.4.340.0170.04319.00
5.4.320.0130.04018.86
5.4.310.0270.03719.05
5.4.300.0130.04318.91
5.4.290.0200.03319.21
5.4.280.0230.06719.03
5.4.270.0230.07319.02
5.4.260.0170.04018.88
5.4.250.0130.04018.85
5.4.240.0270.06319.30
5.4.230.0300.06018.90
5.4.220.0230.07019.16
5.4.210.0170.07018.77
5.4.200.0270.05319.32
5.4.190.0100.04319.06
5.4.180.0200.03719.10
5.4.170.0130.08019.10
5.4.160.0170.04718.98
5.4.150.0200.06719.01
5.4.140.0170.05716.36
5.4.130.0200.06716.54
5.4.120.0100.05016.38
5.4.110.0300.06316.42
5.4.100.0230.06716.40
5.4.90.0130.03716.33
5.4.80.0130.03716.31
5.4.70.0130.03716.28
5.4.60.0300.06016.43
5.4.50.0130.06316.24
5.4.40.0130.03716.38
5.4.30.0300.05016.22
5.4.20.0200.05716.43
5.4.10.0200.06716.52
5.4.00.0170.04715.77
5.3.290.0200.07714.73
5.3.280.0100.04314.57
5.3.270.0100.05014.66
5.3.260.0170.03714.52
5.3.250.0270.07014.57
5.3.240.0200.05014.61
5.3.230.0100.06014.54
5.3.220.0270.06314.54
5.3.210.0130.04014.48
5.3.200.0200.06014.54
5.3.190.0170.08314.46
5.3.180.0230.05314.68
5.3.170.0030.05714.65
5.3.160.0130.06714.55
5.3.150.0200.07014.64
5.3.140.0270.03714.46
5.3.130.0170.04014.63
5.3.120.0200.06014.46
5.3.110.0230.06714.62
5.3.100.0170.04313.96
5.3.90.0100.05014.14
5.3.80.0200.04014.24
5.3.70.0230.05714.13
5.3.60.0230.03714.01
5.3.50.0230.06313.88
5.3.40.0270.07014.00
5.3.30.0170.04314.13
5.3.20.0200.07013.67
5.3.10.0170.04713.81
5.3.00.0200.07013.64
5.2.170.0200.05311.12
5.2.160.0030.04311.05
5.2.150.0030.03711.16
5.2.140.0200.04311.05
5.2.130.0030.04011.03
5.2.120.0170.03311.08
5.2.110.0230.05311.19
5.2.100.0170.03011.02
5.2.90.0130.06311.19
5.2.80.0130.05011.00
5.2.70.0200.03011.05
5.2.60.0200.05310.98
5.2.50.0230.04311.02
5.2.40.0170.02710.92
5.2.30.0070.04711.05
5.2.20.0100.03710.92
5.2.10.0130.06010.86
5.2.00.0170.05710.64
5.1.60.0100.0579.93
5.1.50.0130.0439.90
5.1.40.0130.05310.05
5.1.30.0300.04310.31
5.1.20.0130.03710.43
5.1.10.0200.0479.98
5.1.00.0170.05010.00
5.0.50.0070.0238.53
5.0.40.0070.0408.32
5.0.30.0100.0338.22
5.0.20.0130.0338.28
5.0.10.0070.0308.32
5.0.00.0070.0678.22
4.4.90.0030.0278.22
4.4.80.0130.0278.22
4.4.70.0070.0138.22
4.4.60.0030.0308.22
4.4.50.0070.0208.22
4.4.40.0030.0438.22
4.4.30.0070.0178.22
4.4.20.0030.0208.22
4.4.10.0030.0178.22
4.4.00.0100.0608.22
4.3.110.0100.0338.22
4.3.100.0030.0178.22
4.3.90.0070.0208.22
4.3.80.0100.0508.22
4.3.70.0100.0238.22
4.3.60.0070.0208.22
4.3.50.0070.0208.22
4.3.40.0030.0278.22
4.3.30.0030.0278.22
4.3.20.0030.0378.22
4.3.10.0070.0238.22
4.3.00.0000.0308.22

preferences:
44.74 ms | 401 KiB | 5 Q