3v4l.org

run code in 300+ PHP versions simultaneously
<?php function safehtml ($str) { if (isset($GLOBALS['encoding'])) { $encoding = $GLOBALS['encoding']; } else { $encoding = 'ISO-8859-1'; } if (defined("ENT_XHTML")) { $newstr = htmlentities($str, ENT_COMPAT | ENT_XHTML, $encoding); // FIND-PHP-IGNORE-LINE-P$ } else { $newstr = htmlentities($str, ENT_COMPAT, $encoding); // FIND-PHP-IGNORE-LINE-PAUL } if (strlen($str) !== 0 && strlen($newstr) === 0) { trigger_error('safehtml returned blank string. Input: "'.$str.'"'); } return $newstr; } ?>

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.01116.63
8.3.50.0110.00822.87
8.3.40.0070.00718.59
8.3.30.0030.01218.80
8.3.20.0040.00420.20
8.3.10.0050.00321.57
8.3.00.0100.00017.80
8.2.180.0170.00018.01
8.2.170.0000.01522.96
8.2.160.0030.01020.58
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00420.92
8.2.110.0060.00321.07
8.2.100.0080.00317.66
8.2.90.0030.00619.00
8.2.80.0000.00817.97
8.2.70.0080.00017.38
8.2.60.0000.00817.80
8.2.50.0050.00318.07
8.2.40.0070.00317.78
8.2.30.0040.00417.83
8.2.20.0000.00917.63
8.2.10.0040.00517.89
8.2.00.0030.00617.64
8.1.280.0070.00725.92
8.1.270.0060.00323.91
8.1.260.0020.00526.35
8.1.250.0000.00728.09
8.1.240.0060.00322.34
8.1.230.0060.00620.89
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.10
8.1.190.0000.00917.23
8.1.180.0000.00818.10
8.1.170.0040.00418.35
8.1.160.0040.00421.84
8.1.150.0050.00218.75
8.1.140.0040.00417.35
8.1.130.0070.00017.77
8.1.120.0070.00017.29
8.1.110.0040.00417.31
8.1.100.0030.00317.36
8.1.90.0000.00717.26
8.1.80.0000.00817.33
8.1.70.0000.00717.27
8.1.60.0040.00417.42
8.1.50.0040.00417.34
8.1.40.0040.00417.39
8.1.30.0080.00017.55
8.1.20.0040.00417.39
8.1.10.0040.00417.46
8.1.00.0040.00417.31
8.0.300.0070.00019.72
8.0.290.0070.00016.58
8.0.280.0000.00818.33
8.0.270.0000.00717.16
8.0.260.0040.00417.10
8.0.250.0030.00316.82
8.0.240.0000.00816.75
8.0.230.0070.00016.77
8.0.220.0030.00316.84
8.0.210.0040.00416.81
8.0.200.0030.00316.83
8.0.190.0030.00616.82
8.0.180.0070.00016.71
8.0.170.0060.00316.71
8.0.160.0000.00916.82
8.0.150.0000.00716.71
8.0.140.0030.00516.66
8.0.130.0000.00613.13
8.0.120.0050.00316.79
8.0.110.0000.00716.75
8.0.100.0000.00816.65
8.0.90.0070.00016.63
8.0.80.0090.01216.84
8.0.70.0070.00016.61
8.0.60.0000.00716.66
8.0.50.0000.00716.84
8.0.30.0140.00917.08
8.0.20.0190.00317.40
8.0.10.0000.00816.92
8.0.00.0100.00716.66
7.4.330.0000.00515.00
7.4.320.0030.00316.30
7.4.300.0030.00316.47
7.4.290.0070.00016.34
7.4.280.0060.00316.44
7.4.270.0030.00316.35
7.4.260.0030.00316.30
7.4.250.0050.00216.43
7.4.240.0070.00016.44
7.4.230.0040.00416.46
7.4.220.0060.01216.43
7.4.210.0110.00816.52
7.4.200.0070.00016.29
7.4.160.0070.00816.30
7.4.150.0120.00817.40
7.4.140.0140.00617.86
7.4.130.0080.00816.31
7.4.120.0110.00716.33
7.4.110.0060.01116.46
7.4.100.0000.01716.26
7.4.90.0100.00716.34
7.4.80.0030.01619.39
7.4.70.0130.00516.37
7.4.60.0110.00516.30
7.4.50.0030.00616.25
7.4.40.0120.00916.41
7.4.30.0090.00616.39
7.4.00.0030.01314.80
7.3.330.0000.00513.14
7.3.320.0020.00213.00
7.3.310.0040.00416.23
7.3.300.0000.00716.20
7.3.290.0110.00816.12
7.3.280.0070.01116.17
7.3.270.0090.00917.40
7.3.260.0090.01116.19
7.3.250.0090.00816.30
7.3.240.0060.01116.32
7.3.230.0030.01416.39
7.3.210.0060.01116.42
7.3.200.0130.01019.39
7.3.190.0180.00416.06
7.3.180.0120.00616.15
7.3.170.0100.00616.27
7.3.160.0110.00616.46
7.2.330.0140.00416.44
7.2.320.0000.01716.38
7.2.310.0100.00716.26
7.2.300.0120.00516.43
7.2.290.0060.01016.50
7.2.60.0030.01016.79
7.2.00.0090.00919.17
7.1.200.0070.00715.41
7.1.100.0000.01117.76
7.1.70.0040.00416.98
7.1.60.0070.01019.40
7.1.50.0060.01616.92
7.1.00.0000.08022.48
7.0.200.0000.00916.40
7.0.140.0070.07022.12
7.0.60.0100.08019.88
7.0.50.0070.08317.95
7.0.40.0130.08020.18
7.0.30.0400.04020.23
7.0.20.0330.07320.06
7.0.10.0000.06320.19
7.0.00.0030.05020.32
5.6.280.0030.07320.87
5.6.210.0130.07720.70
5.6.200.0100.04718.12
5.6.190.0030.07320.58
5.6.180.0400.06020.42
5.6.170.0300.07320.39
5.6.160.0030.07020.48
5.6.150.0100.07718.27
5.6.140.0070.08318.16
5.6.130.0030.08318.15
5.6.120.0130.07321.00
5.6.110.0100.08320.98
5.6.100.0100.08320.99
5.6.90.0230.07021.10
5.6.80.0170.05720.49
5.5.350.0300.07320.41
5.5.340.0000.05018.05
5.5.330.0070.07320.19
5.5.320.0270.05320.34
5.5.310.0330.04320.41
5.5.300.0070.08017.99
5.5.290.0100.08018.09
5.5.280.0070.05020.77
5.5.270.0100.06020.76
5.5.260.0030.08020.88
5.5.250.0100.07720.80
5.5.240.0270.04320.16
5.4.450.0300.05019.27
5.4.440.0300.04719.54
5.4.430.0470.04719.20
5.4.420.0570.04719.32
5.4.410.0430.04719.36
5.4.400.0330.03718.85
5.4.390.0500.03719.24
5.4.380.0870.05018.50
5.4.370.0830.07018.59
5.4.360.0930.05718.70
5.4.350.0900.05318.78
5.4.340.0930.05718.77
5.4.320.0060.03612.50
5.4.310.0060.04412.50
5.4.300.0070.03712.50
5.4.290.0070.03612.50
5.4.280.0070.03312.40
5.4.270.0060.03712.40
5.4.260.0050.04012.40
5.4.250.0050.04112.40
5.4.240.0110.03212.40
5.4.230.0080.03812.39
5.4.220.0050.03912.39
5.4.210.0080.04312.39
5.4.200.0060.04212.39
5.4.190.0080.04012.39
5.4.180.0030.04112.38
5.4.170.0070.05112.40
5.4.160.0080.03512.39
5.4.150.0050.03812.39
5.4.140.0060.03812.07
5.4.130.0050.03612.06
5.4.120.0040.03912.02
5.4.110.0050.03612.02
5.4.100.0080.03212.01
5.4.90.0070.03712.01
5.4.80.0030.03912.01
5.4.70.0060.03412.01
5.4.60.0060.03912.01
5.4.50.0060.03912.01
5.4.40.0050.03512.00
5.4.30.0060.03511.99
5.4.20.0070.03512.00
5.4.10.0020.03811.99
5.4.00.0050.03611.48
5.3.290.0050.04012.80
5.3.280.0070.04112.70
5.3.270.0090.04112.72
5.3.260.0110.05412.72
5.3.250.0090.04312.72
5.3.240.0070.04512.72
5.3.230.0150.04812.70
5.3.220.0090.04612.68
5.3.210.0100.05912.68
5.3.200.0040.04512.68
5.3.190.0090.03912.68
5.3.180.0100.04812.68
5.3.170.0160.04212.67
5.3.160.0060.05212.68
5.3.150.0040.04312.68
5.3.140.0070.03812.66
5.3.130.0050.04212.66
5.3.120.0070.04312.66
5.3.110.0070.03712.66
5.3.100.0080.03512.12
5.3.90.0060.03612.10
5.3.80.0030.04012.09
5.3.70.0060.03812.09
5.3.60.0060.03612.07
5.3.50.0070.03412.02
5.3.40.0090.03312.02
5.3.30.0040.03811.98
5.3.20.0050.03711.76
5.3.10.0040.03611.73
5.3.00.0070.03411.71
5.2.170.0060.0299.21
5.2.160.0050.0289.21
5.2.150.0040.0319.21
5.2.140.0040.0319.21
5.2.130.0040.0289.17
5.2.120.0060.0309.17
5.2.110.0040.0299.18
5.2.100.0060.0289.18
5.2.90.0040.0309.17
5.2.80.0070.0289.17
5.2.70.0040.0319.17
5.2.60.0040.0319.13
5.2.50.0070.0299.09
5.2.40.0020.0379.07
5.2.30.0070.0279.04
5.2.20.0040.0319.04
5.2.10.0040.0348.94
5.2.00.0010.0348.80
5.1.60.0020.0268.09
5.1.50.0040.0258.08
5.1.40.0040.0258.06
5.1.30.0050.0258.41
5.1.20.0040.0268.43
5.1.10.0040.0268.16
5.1.00.0030.0268.16
5.0.50.0040.0196.64
5.0.40.0050.0176.50
5.0.30.0040.0306.31
5.0.20.0040.0196.28
5.0.10.0040.0196.26
5.0.00.0050.0296.25
4.4.90.0000.0184.78
4.4.80.0050.0184.76
4.4.70.0010.0184.75
4.4.60.0060.0134.75
4.4.50.0050.0134.77
4.4.40.0020.0274.71
4.4.30.0020.0194.76
4.4.20.0030.0184.84
4.4.10.0030.0184.85
4.4.00.0050.0274.76
4.3.110.0010.0184.67
4.3.100.0010.0174.66
4.3.90.0040.0144.64
4.3.80.0020.0264.58
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0010.0264.54
4.3.30.0020.0163.30
4.3.20.0010.0193.28
4.3.10.0010.0173.24
4.3.00.0030.01715.90

preferences:
41.18 ms | 401 KiB | 5 Q