3v4l.org

run code in 300+ PHP versions simultaneously
<?php // // What ENT_* should I use for htmlspecialchars? // $text = '&"\'<> '; // This is insecure! echo "DEFAULT: " . htmlspecialchars($text, ENT_HTML401 | ENT_COMPAT, 'UTF-8') . "\n"; // This is insecure! echo "ENT_HTML5: " . htmlspecialchars($text, ENT_HTML5, 'UTF-8') . "\n"; // This is good echo "ENT_QUOTES: " . htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . "\n";

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.4.10.0080.01217.62
8.3.140.0110.00716.63
8.3.130.0060.00318.51
8.3.120.0160.00318.84
8.3.110.0040.01116.38
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0000.01116.50
8.3.70.0110.00416.58
8.3.60.0110.01116.50
8.3.50.0110.01122.11
8.3.40.0110.00418.72
8.3.30.0110.00318.38
8.3.20.0030.00620.65
8.3.10.0080.00021.59
8.3.00.0040.00419.68
8.2.260.0080.00016.86
8.2.250.0040.00418.53
8.2.240.0040.00418.84
8.2.230.0030.01620.94
8.2.220.0090.00037.54
8.2.210.0070.01026.77
8.2.200.0110.00016.50
8.2.190.0070.01016.63
8.2.180.0120.00916.32
8.2.170.0040.01222.96
8.2.160.0000.01322.08
8.2.150.0080.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00419.48
8.2.110.0100.00621.50
8.2.100.0030.00917.72
8.2.90.0000.00919.39
8.2.80.0040.00417.97
8.2.70.0070.00217.77
8.2.60.0080.00417.54
8.2.50.0080.00517.65
8.2.40.0060.00518.04
8.2.30.0100.00418.16
8.2.20.0050.00617.80
8.2.10.0090.00417.68
8.2.00.0060.00717.59
8.1.310.0040.00418.13
8.1.300.0040.00417.95
8.1.290.0060.00318.88
8.1.280.0130.00625.92
8.1.270.0040.00423.72
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.01022.13
8.1.230.0070.00422.70
8.1.220.0080.00017.79
8.1.210.0040.00418.97
8.1.200.0090.00317.24
8.1.190.0080.00417.16
8.1.180.0080.00517.49
8.1.170.0050.00717.71
8.1.160.0050.00817.79
8.1.150.0120.00217.92
8.1.140.0100.00318.16
8.1.130.0090.00517.95
8.1.120.0100.00317.92
8.1.110.0070.00618.23
8.1.100.0110.00417.93
8.1.90.0070.00517.72
8.1.80.0100.00517.97
8.1.70.0050.00917.95
8.1.60.0120.00418.03
8.1.50.0110.00617.95
8.1.40.0100.00618.02
8.1.30.0120.00318.07
8.1.20.0080.00918.10
8.1.10.0120.00617.94
8.1.00.0120.00317.93
8.0.300.0000.00819.88
8.0.290.0090.00316.60
8.0.280.0100.00417.54
8.0.270.0080.00616.98
8.0.260.0100.00316.97
8.0.250.0080.00617.79
8.0.240.0120.00317.85
8.0.230.0130.00217.40
8.0.220.0100.00417.40
8.0.210.0110.00317.39
8.0.200.0110.00317.45
8.0.190.0090.00517.49
8.0.180.0100.00517.44
8.0.170.0110.00317.40
8.0.160.0120.00217.44
8.0.150.0120.00417.38
8.0.140.0110.00517.46
8.0.130.0090.00516.70
8.0.120.0110.00416.25
8.0.110.0120.00217.39
8.0.100.0080.00717.34
8.0.90.0100.00417.41
8.0.80.0090.00717.42
8.0.70.0100.00517.33
8.0.60.0100.00417.37
8.0.50.0090.00617.35
8.0.30.0120.00617.53
8.0.20.0100.00817.47
8.0.10.0120.00317.37
8.0.00.0080.00917.48
7.4.330.0110.00115.85
7.4.320.0100.00517.48
7.4.300.0100.00517.19
7.4.290.0090.00517.16
7.4.280.0110.00417.13
7.4.270.0110.00517.17
7.4.260.0100.00617.17
7.4.250.0130.00217.15
7.4.240.0110.00317.17
7.4.230.0100.00417.17
7.4.220.0140.00217.16
7.4.210.0120.00517.13
7.4.200.0100.00417.14
7.4.190.0150.00117.81
7.4.180.0120.00317.36
7.4.160.0090.00717.06
7.4.150.0100.00617.33
7.4.140.0090.00817.59
7.4.130.0100.00616.91
7.4.120.0130.00316.96
7.4.110.0090.00517.14
7.4.100.0090.00717.50
7.4.90.0100.00617.10
7.4.80.0090.00617.72
7.4.70.0100.00417.10
7.4.60.0090.00517.17
7.4.50.0100.00417.06
7.4.40.0080.00617.09
7.4.30.0090.00717.24
7.4.20.0080.00516.92
7.4.10.0090.00616.92
7.4.00.0090.00816.45
7.3.330.0070.00516.32
7.3.320.0100.00316.64
7.3.310.0080.00417.00
7.3.300.0080.00516.97
7.3.290.0090.00616.80
7.3.280.0100.00616.63
7.3.270.0110.00617.24
7.3.260.0130.00916.86
7.3.250.0100.00716.86
7.3.240.0110.00517.01
7.3.230.0110.00517.04
7.3.220.0120.00317.13
7.3.210.0100.00616.96
7.3.200.0120.00416.99
7.3.190.0110.00416.98
7.3.180.0110.00516.96
7.3.170.0120.00417.00
7.3.160.0110.00416.99
7.3.150.0100.00516.88
7.3.140.0110.00416.82
7.3.130.0090.00616.90
7.3.120.0080.00716.52
7.3.110.0100.00616.54
7.3.100.0110.00516.50
7.3.90.0120.00316.63
7.3.80.0090.00616.64
7.3.70.0080.00716.55
7.3.60.0090.00716.63
7.3.50.0110.00416.58
7.3.40.0090.00516.59
7.3.30.0100.00416.63
7.3.20.0110.00517.40
7.3.10.0130.00517.35
7.3.00.0140.00817.33
7.2.340.0090.00617.21
7.2.330.0100.00617.05
7.2.320.0110.00517.11
7.2.310.0120.00417.16
7.2.300.0130.00517.11
7.2.290.0110.00417.05
7.2.280.0100.00516.89
7.2.270.0090.00716.98
7.2.260.0080.00716.94
7.2.250.0080.00816.71
7.2.240.0100.00616.70
7.2.230.0090.00616.75
7.2.220.0100.00516.76
7.2.210.0090.00616.68
7.2.200.0110.00616.75
7.2.190.0090.00716.69
7.2.180.0070.00816.71
7.2.170.0090.00616.70
7.2.160.0100.00516.75
7.2.150.0100.00717.51
7.2.140.0110.00417.46
7.2.130.0160.00417.58
7.2.120.0110.00617.53
7.2.110.0370.01317.22
7.2.100.0130.00717.13
7.2.90.0140.00917.23
7.2.80.0310.00717.16
7.2.70.0090.00717.29
7.2.60.0080.00817.19
7.2.50.0870.00617.21
7.2.40.0520.00817.19
7.2.30.0650.00717.22
7.2.20.0490.00717.27
7.2.10.0490.00717.23
7.2.00.0550.00717.24
7.1.330.0120.00416.83
7.1.320.0100.00516.76
7.1.310.0080.00816.79
7.1.300.0090.00616.84
7.1.290.0140.00516.70
7.1.280.0140.00416.77
7.1.270.0080.00816.78
7.1.260.0110.00716.76
7.1.250.0100.00816.76
7.1.240.0080.00816.70
7.1.230.0340.00516.34
7.1.220.0270.00516.45
7.1.210.0090.00816.40
7.1.200.0260.00616.32
7.1.190.0100.00616.39
7.1.180.0270.00616.39
7.1.170.0800.00516.36
7.1.160.0550.00516.33
7.1.150.0490.00816.35
7.1.140.0490.00616.35
7.1.130.0480.00716.40
7.1.120.0530.00616.32
7.1.110.0510.00616.34
7.1.100.0490.00616.40
7.1.90.0270.00616.32
7.1.80.0290.00516.34
7.1.70.0230.00516.29
7.1.60.0280.00618.42
7.1.50.0260.00918.61
7.1.40.0200.00618.63
7.1.30.0210.00518.55
7.1.20.0230.00618.60
7.1.10.0200.00616.40
7.1.00.0180.01317.00
7.0.330.0110.01016.54
7.0.320.0060.01016.50
7.0.310.0290.00516.10
7.0.300.0600.00616.12
7.0.290.0620.00716.10
7.0.280.0480.00516.05
7.0.270.0620.00616.07
7.0.260.0460.00716.06
7.0.250.0560.00516.18
7.0.240.0460.00616.21
7.0.230.0240.00616.23
7.0.220.0290.00516.18
7.0.210.0250.00516.19
7.0.200.0430.00516.20
7.0.190.0300.00516.19
7.0.180.0250.00616.24
7.0.170.0250.00616.14
7.0.160.0250.00516.09
7.0.150.0240.00416.06
7.0.140.0210.01116.79
7.0.130.0190.01316.82
7.0.120.0190.01516.80
7.0.110.0190.01116.78
7.0.100.0190.01116.77
7.0.90.0210.01116.81
7.0.80.0190.01416.76
7.0.70.0180.01316.76
7.0.60.0180.01016.82
7.0.50.0160.01816.81
7.0.40.0170.01316.58
7.0.30.0170.01316.53
7.0.20.0140.01516.58
7.0.10.0200.01016.63
7.0.00.0200.01216.55
5.6.400.0110.01016.25
5.6.390.0130.00916.24
5.6.380.0090.00615.96
5.6.370.0090.00816.04
5.6.360.0130.00416.01
5.6.350.0130.00916.03
5.6.340.0090.00615.94
5.6.330.0080.00815.97
5.6.320.0120.00416.00
5.6.310.0070.00815.98
5.6.300.0080.00715.92
5.6.290.0110.01016.50
5.6.280.0100.01316.53
5.6.270.0070.01716.45
5.6.260.0120.01016.59
5.6.250.0100.01116.48
5.6.240.0120.01116.60
5.6.230.0090.01416.53
5.6.220.0110.01016.63
5.6.210.0090.01316.53
5.6.200.0100.01616.52
5.6.190.0100.01516.49
5.6.180.0120.01316.55
5.6.170.0080.01216.49
5.6.160.0090.01416.53
5.6.150.0100.01116.50
5.6.140.0120.01016.50
5.6.130.0110.01416.57
5.6.120.0110.01116.59
5.6.110.0100.01116.53
5.6.100.0090.01316.47
5.6.90.0090.01416.53
5.6.80.0090.01416.43
5.6.70.0090.01316.46
5.6.60.0090.01316.50
5.6.50.0080.01216.41
5.6.40.0090.01616.40
5.6.30.0110.01216.48
5.6.20.0100.01216.47
5.6.10.0110.01116.49
5.6.00.0100.01116.38

preferences:
57.49 ms | 403 KiB | 5 Q