3v4l.org

run code in 300+ PHP versions simultaneously
<?php class utils { public static function replace_unicode_escape_sequence($str) { return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', function ($match) { return mb_convert_encoding(pack('H*', $match[1]), 'latin1', 'UCS-2BE'); }, $str); } } header('Content-Type: text/plain; charset=latin1'); $str = '{"name":"F\u00f6retag: Betalning"}'; echo utils::replace_unicode_escape_sequence(mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'));

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.0100.00716.63
8.3.50.0120.00722.06
8.3.40.0090.00918.96
8.3.30.0040.01119.17
8.3.20.0040.00420.37
8.3.10.0000.00723.51
8.3.00.0070.00018.98
8.2.180.0090.00618.79
8.2.170.0040.01122.96
8.2.160.0060.00920.47
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.71
8.2.110.0000.00822.36
8.2.100.0030.01020.10
8.2.90.0040.00419.24
8.2.80.0040.00417.97
8.2.70.0060.00318.00
8.2.60.0050.00318.18
8.2.50.0000.00918.13
8.2.40.0040.00420.32
8.2.30.0000.00818.36
8.2.20.0040.00418.26
8.2.10.0020.00518.46
8.2.00.0040.00418.09
8.1.280.0110.00725.92
8.1.270.0080.00022.32
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0000.01023.95
8.1.230.0040.00819.23
8.1.220.0080.00017.91
8.1.210.0080.00018.77
8.1.200.0060.00317.63
8.1.190.0000.00817.75
8.1.180.0080.00019.63
8.1.170.0030.00618.96
8.1.160.0000.00722.23
8.1.150.0040.00418.89
8.1.140.0100.00017.71
8.1.130.0030.00317.98
8.1.120.0000.00717.79
8.1.110.0040.00717.76
8.1.100.0000.00717.79
8.1.90.0030.00517.61
8.1.80.0000.00717.82
8.1.70.0000.00717.80
8.1.60.0040.00417.93
8.1.50.0040.00417.84
8.1.40.0000.00817.85
8.1.30.0050.00317.98
8.1.20.0000.00817.91
8.1.10.0050.00317.83
8.1.00.0080.00017.88
8.0.300.0040.00418.77
8.0.290.0040.00417.13
8.0.280.0030.00518.64
8.0.270.0000.00717.41
8.0.260.0040.00417.34
8.0.250.0000.00717.28
8.0.240.0000.00717.17
8.0.230.0000.00717.18
8.0.220.0040.00417.17
8.0.210.0040.00417.09
8.0.200.0070.00017.20
8.0.190.0040.00417.25
8.0.180.0040.00417.21
8.0.170.0080.00017.13
8.0.160.0030.00517.13
8.0.150.0000.00717.12
8.0.140.0040.00417.16
8.0.130.0000.00613.57
8.0.120.0050.00317.16
8.0.110.0000.00717.20
8.0.100.0000.00817.06
8.0.90.0000.00717.18
8.0.80.0090.00917.19
8.0.70.0040.00417.07
8.0.60.0000.00817.04
8.0.50.0040.00417.06
8.0.30.0140.00517.35
8.0.20.0110.00817.64
8.0.10.0040.00417.27
8.0.00.0080.00917.02
7.4.330.0000.00515.34
7.4.320.0030.00316.80
7.4.300.0030.00316.84
7.4.290.0040.00416.95
7.4.280.0050.00316.83
7.4.270.0000.00816.94
7.4.260.0030.00316.88
7.4.250.0040.00416.71
7.4.240.0010.00616.95
7.4.230.0030.00317.00
7.4.220.0040.01416.97
7.4.210.0070.00816.94
7.4.200.0000.00716.94
7.4.190.0030.00316.91
7.4.160.0060.01016.84
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0080.01116.79
7.4.120.0100.01016.84
7.4.110.0080.00816.72
7.4.100.0120.01216.59
7.4.90.0120.00616.97
7.4.80.0060.01219.39
7.4.70.0110.00716.97
7.4.60.0080.01016.52
7.4.50.0040.00416.62
7.4.40.0110.00716.68
7.4.30.0140.00716.82
7.4.00.0120.00615.32
7.3.330.0050.00013.61
7.3.320.0030.00313.51
7.3.310.0050.00316.83
7.3.300.0040.00416.67
7.3.290.0080.01216.60
7.3.280.0070.00916.59
7.3.270.0030.01317.40
7.3.260.0070.01016.62
7.3.250.0080.01216.88
7.3.240.0140.00416.68
7.3.230.0080.00816.74
7.3.210.0040.01316.80
7.3.200.0120.00919.39
7.3.190.0030.01616.70
7.3.180.0060.01016.81
7.3.170.0050.01116.62
7.3.160.0160.00016.60
7.3.120.0000.01415.35
7.2.330.0130.01016.96
7.2.320.0070.01116.67
7.2.310.0140.00316.95
7.2.300.0110.00617.03
7.2.290.0100.00717.07
7.2.00.0070.00719.59
7.1.100.0120.00618.28
7.1.70.0000.00817.36
7.1.60.0130.01019.46
7.1.50.0030.00917.25
7.1.00.0030.07722.59
7.0.200.0060.00317.06
7.0.140.0030.07022.18
7.0.60.0230.07021.90
7.0.50.0130.07717.93
7.0.40.0070.04720.42
7.0.30.0030.07720.37
7.0.20.0370.07320.32
7.0.10.0030.09320.24
7.0.00.0070.06720.12
5.6.280.0000.07720.90
5.6.210.0130.03320.54
5.6.200.0000.05318.14
5.6.190.0000.04720.48
5.6.180.0300.04020.47
5.6.170.0300.07020.44
5.6.160.0030.08320.51
5.6.150.0100.05018.14
5.6.140.0070.07318.18
5.6.130.0070.09018.17
5.6.120.0200.07021.05
5.6.110.0070.07321.02
5.6.100.0100.07021.01
5.6.90.0100.07320.96
5.6.80.0070.04720.36
5.5.350.0030.06320.33
5.5.340.0070.05317.99
5.5.330.0130.05320.25
5.5.320.0630.06020.52
5.5.310.0300.06720.24
5.5.300.0070.08317.98
5.5.290.0070.07017.96
5.5.280.0100.05320.77
5.5.270.0070.04720.65
5.5.260.0170.07020.98
5.5.250.0070.04020.46
5.5.240.0200.06720.20
5.4.450.0030.08319.30
5.4.440.0100.07019.59
5.4.430.0000.08019.26
5.4.420.0070.03319.45
5.4.410.0000.04019.25
5.4.400.0070.03719.11
5.4.390.0000.03719.11
5.4.380.0030.03718.81
5.4.370.0000.03719.14
5.4.360.0000.03719.11
5.4.350.0000.03719.20
5.4.340.0100.03719.19
5.4.320.0000.04319.19
5.4.310.0070.03719.11
5.4.300.0030.03719.19
5.4.290.0030.04019.05
5.4.280.0030.03719.05
5.4.270.0000.03719.14
5.4.260.0000.03718.81
5.4.250.0000.03719.18
5.4.240.0000.03719.19
5.4.230.0000.03719.01
5.4.220.0070.03019.11
5.4.210.0000.03719.09
5.4.200.0030.03719.10
5.4.190.0070.03018.93
5.4.180.0030.03319.22
5.4.170.0000.04019.01
5.4.160.0030.05318.93
5.4.150.0000.06019.04
5.4.140.0030.06016.50
5.4.130.0030.07716.68
5.4.120.0100.03716.49
5.4.110.0000.06716.39
5.4.100.0000.07316.58
5.4.90.0000.05016.56
5.4.80.0000.07716.54
5.4.70.0000.04716.55
5.4.60.0030.04716.14
5.4.50.0000.07016.34
5.4.40.0070.04016.49
5.4.30.0000.03716.43
5.4.20.0070.07016.50
5.4.10.0070.06716.52
5.4.00.0070.06315.91
5.3.290.0070.03714.59
5.3.280.0000.03714.52
5.3.270.0030.04314.63
5.3.260.0030.05314.77
5.3.250.0000.05714.83
5.3.240.0070.06014.72
5.3.230.0100.04014.82
5.3.220.0030.06714.59
5.3.210.0100.07714.68
5.3.200.0070.05014.62
5.3.190.0030.05714.57
5.3.180.0030.04014.49
5.3.170.0030.06314.63
5.3.160.0000.08014.46
5.3.150.0030.05314.57
5.3.140.0070.07014.46
5.3.130.0030.06714.57
5.3.120.0030.06014.77
5.3.110.0000.05714.71
5.3.100.0030.04014.20
5.3.90.0000.04313.94
5.3.80.0000.05014.03
5.3.70.0030.07714.25
5.3.60.0070.06714.17
5.3.50.0070.06313.88
5.3.40.0070.07314.18
5.3.30.0030.05313.99
5.3.20.0000.07313.80
5.3.10.0030.05713.57
5.3.00.0030.05713.57
5.2.170.0070.04011.05
5.2.160.0000.05011.14
5.2.150.0100.04311.26
5.2.140.0030.06011.30
5.2.130.0070.03311.01
5.2.120.0000.06311.08
5.2.110.0030.05711.21
5.2.100.0030.05011.05
5.2.90.0070.04011.06
5.2.80.0030.06311.10
5.2.70.0000.03311.07
5.2.60.0000.05711.10
5.2.50.0070.05010.95
5.2.40.0000.03711.08
5.2.30.0070.05711.05
5.2.20.0030.04311.12
5.2.10.0070.06010.95
5.2.00.0030.05710.87
5.1.60.0030.0309.88
5.1.50.0030.0309.91
5.1.40.0000.0439.89
5.1.30.0030.06010.34
5.1.20.0070.04310.47
5.1.10.0030.05310.12
5.1.00.0030.0309.98
5.0.50.0000.0379.45
5.0.40.0030.0439.45
5.0.30.0030.0409.45
5.0.20.0000.0479.45
5.0.10.0000.0439.45
5.0.00.0070.0609.45
4.4.90.0030.0379.45
4.4.80.0000.0239.45
4.4.70.0100.0279.45
4.4.60.0030.0339.45
4.4.50.0170.0279.45
4.4.40.0030.0339.45
4.4.30.0030.0339.45
4.4.20.0000.0209.45
4.4.10.0000.0409.45
4.4.00.0000.0509.45
4.3.110.0000.0339.45
4.3.100.0030.0339.45
4.3.90.0030.0279.45
4.3.80.0070.0479.45
4.3.70.0030.0239.45
4.3.60.0030.0309.45
4.3.50.0030.0339.45
4.3.40.0000.0279.45
4.3.30.0030.0179.45
4.3.20.0000.0179.45
4.3.10.0000.0409.45
4.3.00.0070.0279.45

preferences:
39.94 ms | 401 KiB | 5 Q