3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encode($str) { $str = mb_convert_encoding($str , 'UTF-32', 'UTF-8'); //big endian $split = str_split($str, 4); $res = ""; foreach ($split as $c) { $cur = 0; for ($i = 0; $i < 4; $i++) { $cur |= ord($c[$i]) << (8*(3 - $i)); } $res .= "&#" . $cur . ";"; } return $res; } echo encode("mailto:liisa.vahakyla@finnanimation.fi");

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.0070.00718.55
8.3.50.0130.00718.29
8.3.40.0060.01218.66
8.3.30.0070.00719.07
8.3.20.0000.00720.33
8.3.10.0000.00820.52
8.3.00.0030.00517.75
8.2.180.0060.01216.63
8.2.170.0040.01122.96
8.2.160.0100.00320.52
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00422.06
8.2.110.0060.00320.22
8.2.100.0000.01118.16
8.2.90.0000.00819.03
8.2.80.0000.00817.97
8.2.70.0000.00817.61
8.2.60.0040.00418.17
8.2.50.0070.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00418.12
8.2.20.0040.00417.69
8.2.10.0040.00418.13
8.2.00.0040.00417.72
8.1.270.0080.00023.71
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00723.72
8.1.230.0110.00019.09
8.1.220.0070.00017.76
8.1.210.0000.00918.77
8.1.200.0040.00417.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00418.72
8.1.160.0000.00722.07
8.1.150.0000.00718.97
8.1.140.0050.00217.43
8.1.130.0030.00317.75
8.1.120.0080.00017.61
8.1.110.0040.00417.57
8.1.100.0080.00017.55
8.1.90.0040.00417.37
8.1.80.0000.00717.51
8.1.70.0030.00317.48
8.1.60.0060.00317.63
8.1.50.0060.00317.57
8.1.40.0040.00417.55
8.1.30.0030.00617.67
8.1.20.0040.00417.71
8.1.10.0000.00717.52
8.1.00.0050.00217.59
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.57
8.0.270.0080.00017.24
8.0.260.0000.00817.27
8.0.250.0000.00717.08
8.0.240.0030.00517.01
8.0.230.0000.00716.86
8.0.220.0070.00016.94
8.0.210.0060.00016.95
8.0.200.0060.00016.89
8.0.190.0040.00417.11
8.0.180.0030.00316.87
8.0.170.0040.00416.99
8.0.160.0070.00017.00
8.0.150.0030.00316.95
8.0.140.0040.00416.90
8.0.130.0000.00513.36
8.0.120.0050.00316.88
8.0.110.0040.00416.99
8.0.100.0000.00717.03
8.0.90.0030.00516.84
8.0.80.0060.00917.01
8.0.70.0040.00416.91
8.0.60.0000.00716.88
8.0.50.0000.00716.76
8.0.30.0080.01017.22
8.0.20.0120.01117.40
8.0.10.0050.00316.93
8.0.00.0140.00516.84
7.4.330.0020.00215.15
7.4.320.0050.00216.48
7.4.300.0030.00316.57
7.4.290.0000.00816.57
7.4.280.0070.00016.62
7.4.270.0030.00516.60
7.4.260.0000.00816.70
7.4.250.0090.00016.63
7.4.240.0030.00516.68
7.4.230.0030.00316.51
7.4.220.0090.00916.71
7.4.210.0040.01116.54
7.4.200.0000.00716.77
7.4.160.0140.00316.59
7.4.150.0050.01417.40
7.4.140.0090.00917.86
7.4.130.0070.01016.58
7.4.120.0150.00516.50
7.4.110.0140.00416.52
7.4.100.0100.00716.64
7.4.90.0130.00316.41
7.4.80.0100.00719.39
7.4.70.0150.00716.36
7.4.60.0070.01016.66
7.4.50.0040.00416.66
7.4.40.0080.00816.57
7.4.30.0130.01016.61
7.4.00.0090.00614.97
7.3.330.0020.00513.40
7.3.320.0050.00013.39
7.3.310.0070.00016.41
7.3.300.0000.00716.25
7.3.290.0110.00316.28
7.3.280.0080.00916.34
7.3.270.0120.00617.40
7.3.260.0100.01316.55
7.3.250.0080.01216.54
7.3.240.0120.00916.37
7.3.230.0130.00316.61
7.3.210.0160.01716.39
7.3.200.0060.01519.39
7.3.190.0060.01316.38
7.3.180.0100.00616.30
7.3.170.0060.01016.40
7.3.160.0050.01116.59
7.2.330.0130.00316.63
7.2.320.0070.01116.87
7.2.310.0070.01116.60
7.2.300.0040.01416.77
7.2.290.0100.00716.54
7.2.00.0060.00319.62
7.1.100.0040.01117.86
7.1.70.0040.00417.27
7.1.60.0100.01419.32
7.1.50.0040.01416.83
7.1.00.0100.07022.43
7.0.200.0000.00716.82
7.0.140.0030.07321.92
7.0.60.0000.04319.93
7.0.50.0030.04017.88
7.0.40.0100.05319.96
7.0.30.0530.07020.17
7.0.20.0170.06020.05
7.0.10.0070.04720.19
7.0.00.0170.07320.23
5.6.280.0100.06721.00
5.6.210.0130.07020.52
5.6.200.0070.04318.23
5.6.190.0100.08020.39
5.6.180.0370.04320.64
5.6.170.0100.04720.48
5.6.160.0100.04020.44
5.6.150.0070.03318.16
5.6.140.0000.04318.14
5.6.130.0100.04318.15
5.6.120.0130.07720.93
5.6.110.0000.08721.14
5.6.100.0070.07020.98
5.6.90.0070.08021.11
5.6.80.0130.07720.51
5.5.350.0100.04720.54
5.5.340.0070.04718.07
5.5.330.0230.04020.35
5.5.320.0330.07720.28
5.5.310.0300.03720.51
5.5.300.0170.07017.93
5.5.290.0100.04717.95
5.5.280.0070.08320.85
5.5.270.0100.06020.63
5.5.260.0000.05020.79
5.5.250.0100.03720.69
5.5.240.0200.07720.19
5.4.450.0070.03719.49
5.4.440.0700.06719.63
5.4.430.1130.05319.29
5.4.420.0670.00019.54
5.4.410.0600.00019.26
5.4.400.0630.00018.91
5.4.390.0630.00019.13
5.4.380.0830.00019.09
5.4.370.0630.00019.21
5.4.360.0630.00019.07
5.4.350.0670.00019.01
5.4.340.0630.00019.11
5.4.320.0040.03912.50
5.4.310.0080.03512.50
5.4.300.0050.03712.50
5.4.290.0050.04012.50
5.4.280.0070.03612.40
5.4.270.0070.03612.40
5.4.260.0070.03512.40
5.4.250.0050.03812.39
5.4.240.0080.03512.40
5.4.230.0050.03912.39
5.4.220.0060.03512.39
5.4.210.0080.03912.39
5.4.200.0030.04012.39
5.4.190.0020.03912.38
5.4.180.0050.03712.39
5.4.170.0060.03612.39
5.4.160.0040.04312.39
5.4.150.0060.04112.39
5.4.140.0070.03512.07
5.4.130.0060.04112.06
5.4.120.0050.03612.02
5.4.110.0040.03712.01
5.4.100.0060.03412.01
5.4.90.0060.03612.01
5.4.80.0080.03412.02
5.4.70.0100.03212.01
5.4.60.0050.03512.01
5.4.50.0030.04212.00
5.4.40.0060.03612.00
5.4.30.0070.03412.00
5.4.20.0060.03411.99
5.4.10.0020.03812.00
5.4.00.0040.03711.48
5.3.290.0060.04212.80
5.3.280.0060.03712.71
5.3.270.0060.03912.72
5.3.260.0070.03812.72
5.3.250.0070.03612.72
5.3.240.0070.03612.72
5.3.230.0080.03512.71
5.3.220.0060.03612.68
5.3.210.0110.03212.68
5.3.200.0050.03612.68
5.3.190.0070.03612.68
5.3.180.0080.03312.67
5.3.170.0090.03312.67
5.3.160.0060.03512.68
5.3.150.0080.03412.68
5.3.140.0070.03412.66
5.3.130.0030.04212.66
5.3.120.0070.05012.66
5.3.110.0060.04212.66
5.3.100.0070.03512.12
5.3.90.0060.04312.10
5.3.80.0040.03812.09
5.3.70.0050.04212.09
5.3.60.0050.03712.07
5.3.50.0080.03412.02
5.3.40.0060.03512.02
5.3.30.0070.03711.98
5.3.20.0050.03511.76
5.3.10.0040.03511.73
5.3.00.0070.03511.71
5.2.170.0080.0339.21
5.2.160.0020.0329.22
5.2.150.0050.0309.21
5.2.140.0060.0289.21
5.2.130.0060.0279.18
5.2.120.0030.0309.17
5.2.110.0050.0299.18
5.2.100.0060.0279.18
5.2.90.0040.0329.18
5.2.80.0040.0309.17
5.2.70.0040.0319.17
5.2.60.0070.0289.13
5.2.50.0020.0339.09
5.2.40.0030.0309.07
5.2.30.0040.0309.05
5.2.20.0050.0299.04
5.2.10.0040.0278.94
5.2.00.0050.0288.80
5.1.60.0060.0218.09
5.1.50.0040.0308.08
5.1.40.0020.0278.06
5.1.30.0040.0268.42
5.1.20.0070.0248.44
5.1.10.0090.0218.16
5.1.00.0030.0268.16
5.0.50.0030.0216.64
5.0.40.0020.0216.50
5.0.30.0070.0286.32
5.0.20.0040.0196.28
5.0.10.0030.0216.26
5.0.00.0050.0386.26
4.4.90.0030.0194.78
4.4.80.0030.0164.75
4.4.70.0020.0164.75
4.4.60.0040.0164.76
4.4.50.0040.0144.77
4.4.40.0040.0234.71
4.4.30.0000.0184.76
4.4.20.0020.0174.84
4.4.10.0040.0144.85
4.4.00.0050.0224.75
4.3.110.0050.0134.67
4.3.100.0020.0154.67
4.3.90.0030.0134.63
4.3.80.0010.0254.59
4.3.70.0050.0124.63
4.3.60.0020.0174.63
4.3.50.0010.0164.63
4.3.40.0010.0254.54
4.3.30.0020.0163.30
4.3.20.0020.0153.27
4.3.10.0020.0153.24
4.3.00.0000.0139.41

preferences:
52.22 ms | 400 KiB | 5 Q