3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "â€"; var_dump(htmlentities($string, ENT_QUOTES, "UTF-8")); var_dump(mb_convert_encoding($string, "HTML-ENTITIES", mb_detect_encoding($string)));

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.50
8.3.50.0240.00822.05
8.3.40.0090.00618.71
8.3.30.0110.00319.11
8.3.20.0040.00420.35
8.3.10.0040.00421.87
8.3.00.0080.00019.13
8.2.180.0120.00316.63
8.2.170.0000.01422.96
8.2.160.0130.00020.35
8.2.150.0000.00724.18
8.2.140.0000.00724.66
8.2.130.0080.00526.16
8.2.120.0050.00322.09
8.2.110.0090.00022.16
8.2.100.0130.00017.74
8.2.90.0000.00819.23
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0030.00617.93
8.2.50.0030.00618.07
8.2.40.0050.00319.95
8.2.30.0030.00617.97
8.2.20.0040.00417.55
8.2.10.0040.00419.84
8.2.00.0000.01017.54
8.1.280.0140.00025.92
8.1.270.0080.00023.83
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0040.00423.82
8.1.230.0040.00819.16
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0080.00017.22
8.1.190.0080.00017.40
8.1.180.0000.01218.10
8.1.170.0090.00018.46
8.1.160.0040.00421.88
8.1.150.0040.00418.70
8.1.140.0030.00517.35
8.1.130.0040.00417.73
8.1.120.0030.00517.53
8.1.110.0000.00817.50
8.1.100.0060.00317.46
8.1.90.0070.00017.35
8.1.80.0050.00217.45
8.1.70.0000.00717.38
8.1.60.0030.00517.61
8.1.50.0000.00817.39
8.1.40.0070.00017.39
8.1.30.0000.00817.57
8.1.20.0040.00417.56
8.1.10.0040.00417.36
8.1.00.0040.00417.38
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0000.00818.45
8.0.270.0040.00417.32
8.0.260.0060.00017.24
8.0.250.0000.00617.03
8.0.240.0070.00016.85
8.0.230.0000.00716.98
8.0.220.0040.00416.88
8.0.210.0040.00416.87
8.0.200.0040.00416.93
8.0.190.0000.00716.95
8.0.180.0000.00816.96
8.0.170.0000.00716.91
8.0.160.0050.00316.70
8.0.150.0000.00716.71
8.0.140.0030.00516.81
8.0.130.0030.00313.35
8.0.120.0000.00816.73
8.0.110.0040.00416.89
8.0.100.0070.00016.80
8.0.90.0000.00716.76
8.0.80.0040.01116.92
8.0.70.0030.00316.75
8.0.60.0000.00716.83
8.0.50.0000.00716.90
8.0.30.0110.00816.95
8.0.20.0080.01017.40
8.0.10.0070.00016.89
8.0.00.0080.01016.74
7.4.330.0000.00515.04
7.4.320.0000.00616.61
7.4.300.0000.00916.64
7.4.290.0070.00016.61
7.4.280.0000.00716.49
7.4.270.0000.00716.56
7.4.260.0030.00316.35
7.4.250.0000.00916.53
7.4.240.0050.00216.45
7.4.230.0000.00716.61
7.4.220.0160.00016.67
7.4.210.0060.00816.55
7.4.200.0030.00316.61
7.4.190.0050.00216.66
7.4.160.0060.00916.21
7.4.150.0070.01017.40
7.4.140.0100.01117.86
7.4.130.0110.00516.50
7.4.120.0060.01016.41
7.4.110.0100.01316.49
7.4.100.0090.00916.38
7.4.90.0100.01316.48
7.4.80.0090.00919.39
7.4.70.0100.00716.47
7.4.60.0090.00916.43
7.4.50.0050.00216.37
7.4.40.0070.01022.77
7.4.30.0030.01316.50
7.4.00.0130.00314.98
7.3.330.0000.00713.12
7.3.320.0000.00513.09
7.3.310.0000.00716.05
7.3.300.0040.00416.23
7.3.290.0060.00916.20
7.3.280.0060.01316.23
7.3.270.0070.01017.40
7.3.260.0180.00516.31
7.3.250.0120.00516.25
7.3.240.0110.00516.19
7.3.230.0120.00316.39
7.3.210.0030.01416.30
7.3.200.0090.00919.39
7.3.190.0110.01116.46
7.3.180.0030.01316.43
7.3.170.0160.00016.46
7.3.160.0120.00516.54
7.3.120.0040.01214.68
7.2.330.0060.01016.30
7.2.320.0030.01716.50
7.2.310.0070.01016.38
7.2.300.0040.01316.57
7.2.290.0110.00616.64
7.2.00.0000.01219.51
7.1.100.0040.00818.04
7.1.70.0070.00017.06
7.1.60.0060.01819.46
7.1.50.0130.01016.91
7.1.00.0030.07322.54
7.0.200.0340.00714.79
7.0.140.0000.07021.95
7.0.60.0070.03719.93
7.0.50.0030.06317.82
7.0.40.0130.04720.09
7.0.30.0130.05320.00
7.0.20.0270.07020.19
7.0.10.0000.04720.13
7.0.00.0130.08320.11
5.6.280.0030.07320.98
5.6.210.0070.03720.46
5.6.200.0070.08318.21
5.6.190.0100.06020.60
5.6.180.0300.05020.27
5.6.170.0100.04720.71
5.6.160.0030.04020.70
5.6.150.0030.05018.18
5.6.140.0030.03718.21
5.6.130.0030.08718.07
5.6.120.0070.07021.09
5.6.110.0070.04321.00
5.6.100.0070.08321.09
5.6.90.0130.07321.07
5.6.80.0030.08320.50
5.6.70.3930.03720.36
5.5.350.0000.07320.47
5.5.340.0070.06717.92
5.5.330.0130.07720.21
5.5.320.0170.05020.50
5.5.310.0270.05720.48
5.5.300.0030.08717.98
5.5.290.0030.08317.91
5.5.280.0130.04720.89
5.5.270.0200.07020.86
5.5.260.0130.08020.79
5.5.250.0030.08020.68
5.5.240.0170.03720.11
5.4.450.0100.06719.61
5.4.440.0200.05319.60
5.4.430.0100.06719.26
5.4.420.0130.05719.47
5.4.410.0330.04719.38
5.4.400.0230.04019.14
5.4.390.0200.05019.12
5.4.380.0100.07018.71
5.4.370.0400.04718.49
5.4.360.0200.06018.72
5.4.350.0370.05318.77
5.4.340.0200.05718.62
5.4.320.0070.04112.46
5.4.310.0080.04612.45
5.4.300.0040.03812.45
5.4.290.0130.03512.43
5.4.280.0060.03912.33
5.4.270.0100.03812.33
5.4.260.0090.04012.33
5.4.250.0040.04012.33
5.4.240.0060.03712.33
5.4.230.0060.03812.32
5.4.220.0090.03412.32
5.4.210.0060.03712.32
5.4.200.0060.04412.32
5.4.190.0070.03512.32
5.4.180.0070.03712.32
5.4.170.0100.03412.33
5.4.160.0060.05112.33
5.4.150.0080.03712.32
5.4.140.0050.03812.00
5.4.130.0060.03612.00
5.4.120.0120.04011.95
5.4.110.0050.03711.95
5.4.100.0070.03611.95
5.4.90.0060.03911.95
5.4.80.0070.05111.95
5.4.70.0090.03511.95
5.4.60.0040.03711.94
5.4.50.0050.03611.94
5.4.40.0060.03611.93
5.4.30.0050.03711.93
5.4.20.0040.03811.93
5.4.10.0070.03711.93
5.4.00.0050.04111.42
5.3.290.0080.04212.80
5.3.280.0070.04112.71
5.3.270.0070.04212.73
5.3.260.0130.04612.72
5.3.250.0120.05112.72
5.3.240.0090.05612.71
5.3.230.0070.05112.71
5.3.220.0060.05812.68
5.3.210.0070.06212.68
5.3.200.0080.06312.68
5.3.190.0090.05912.68
5.3.180.0100.04512.67
5.3.170.0120.05712.67
5.3.160.0080.05112.68
5.3.150.0110.03712.67
5.3.140.0100.03712.66
5.3.130.0090.04112.66
5.3.120.0080.05712.66
5.3.110.0120.04812.66
5.3.100.0180.05912.12
5.3.90.0130.04912.08
5.3.80.0110.03312.07
5.3.70.0070.03812.08
5.3.60.0070.04212.06
5.3.50.0080.04212.00
5.3.40.0080.03812.00
5.3.30.0210.04911.94
5.3.20.0080.04711.72
5.3.10.0100.04811.69
5.3.00.0140.05411.67
5.2.170.0050.0499.18
5.2.160.0120.0479.18
5.2.150.0030.0399.18
5.2.140.0050.0339.18
5.2.130.0060.0309.13
5.2.120.0060.0299.13
5.2.110.0100.0269.14
5.2.100.0070.0309.14
5.2.90.0050.0319.14
5.2.80.0090.0299.13
5.2.70.0060.0319.14
5.2.60.0090.0289.08
5.2.50.0070.0319.05
5.2.40.0080.0309.04
5.2.30.0160.0509.01
5.2.20.0150.0688.99
5.2.10.0070.0508.92
5.2.00.0110.0398.78
5.1.60.0050.0368.07
5.1.50.0070.0308.07
5.1.40.0050.0288.05
5.1.30.0040.0308.39
5.1.20.0080.0248.42
5.1.10.0070.0288.14
5.1.00.0070.0238.14
5.0.50.0050.0246.62
5.0.40.0040.0206.48
5.0.30.0020.0336.29
5.0.20.0020.0236.26
5.0.10.0040.0206.25
5.0.00.0040.0316.23
4.4.90.0030.0164.78
4.4.80.0050.0164.75
4.4.70.0030.0164.75
4.4.60.0020.0164.76
4.4.50.0040.0144.77
4.4.40.0010.0274.70
4.4.30.0010.0174.76
4.4.20.0030.0154.84
4.4.10.0020.0174.85
4.4.00.0030.0254.76
4.3.110.0040.0144.67
4.3.100.0040.0144.66
4.3.90.0030.0154.63
4.3.80.0040.0234.58
4.3.70.0040.0144.63
4.3.60.0030.0154.63
4.3.50.0040.0154.63
4.3.40.0050.0244.54
4.3.30.0020.0213.29
4.3.20.0080.0243.26
4.3.10.0070.0213.20
4.3.00.0000.01713.47

preferences:
25.77 ms | 401 KiB | 5 Q