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]), 'ISO-8859-1', 'UCS-2BE'); }, $str); } } header('Content-Type: text/plain; charset=latin1'); $str = '{"name":"F\u00f6retag: Betalning"}'; echo utils::replace_unicode_escape_sequence(utf8_encode($str));

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.140.0140.00718.05
8.4.130.0090.01418.09
8.4.120.0110.00920.46
8.4.110.0110.01022.39
8.4.100.0140.00718.90
8.4.90.0120.00818.83
8.4.80.0130.00820.64
8.4.70.0060.00318.05
8.4.60.0110.00924.03
8.4.50.0050.00419.67
8.4.40.0120.00819.99
8.4.30.0120.00918.16
8.4.20.0090.01218.20
8.4.10.0100.00618.16
8.3.270.0090.01016.57
8.3.260.0110.00916.93
8.3.250.0110.00619.12
8.3.240.0070.00617.19
8.3.230.0110.00816.99
8.3.220.0080.01018.85
8.3.210.0100.00816.66
8.3.200.0050.00416.63
8.3.190.0130.00617.28
8.3.180.0040.00418.57
8.3.170.0150.00316.91
8.3.160.0060.01216.81
8.3.150.0190.00017.27
8.3.140.0000.00917.08
8.3.130.0060.00318.61
8.3.120.0000.00919.13
8.3.110.0050.00520.94
8.3.100.0000.00816.75
8.3.90.0040.00418.64
8.3.80.0090.00018.43
8.3.70.0030.01218.68
8.3.60.0150.00616.63
8.3.50.0030.01222.04
8.3.40.0110.00418.94
8.3.30.0140.00719.09
8.3.20.0000.00820.16
8.3.10.0080.00023.53
8.3.00.0000.00820.84
8.2.290.0050.00420.58
8.2.280.0080.01020.73
8.2.270.0040.01517.27
8.2.260.0100.00721.09
8.2.250.0030.00918.89
8.2.240.0090.00019.33
8.2.230.0090.00322.58
8.2.220.0060.00324.06
8.2.210.0040.00426.77
8.2.200.0070.00318.79
8.2.190.0140.00719.04
8.2.180.0110.00718.93
8.2.170.0070.01422.96
8.2.160.0140.00020.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.43
8.2.110.0060.00322.62
8.2.100.0070.00418.28
8.2.90.0050.00319.36
8.2.80.0050.00318.25
8.2.70.0040.00418.00
8.2.60.0000.00818.18
8.2.50.0000.01118.11
8.2.40.0060.00320.22
8.2.30.0060.00518.46
8.2.20.0000.00818.22
8.2.10.0000.00818.37
8.2.00.0000.00918.27
8.1.330.0080.00723.80
8.1.320.0130.01116.64
8.1.310.0050.00317.09
8.1.300.0060.00318.47
8.1.290.0060.00318.88
8.1.280.0040.01225.92
8.1.270.0050.00324.07
8.1.260.0060.00326.35
8.1.250.0050.00228.09
8.1.240.0090.00024.10
8.1.230.0110.00019.27
8.1.220.0000.00817.77
8.1.210.0000.00918.77
8.1.200.0080.00417.85
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0060.00318.82
8.1.160.0040.00422.19
8.1.150.0050.00219.05
8.1.140.0030.00617.59
8.1.130.0030.00318.02
8.1.120.0020.00517.86
8.1.110.0000.00917.70
8.1.100.0040.00417.84
8.1.90.0000.00717.61
8.1.80.0000.01117.81
8.1.70.0000.00717.76
8.1.60.0040.00417.96
8.1.50.0050.00317.74
8.1.40.0030.00717.83
8.1.30.0030.00518.00
8.1.20.0080.00017.92
8.1.10.0080.00017.96
8.1.00.0000.00817.88
8.0.300.0050.00318.77
8.0.290.0040.00417.16
8.0.280.0030.00518.59
8.0.270.0000.00717.28
8.0.260.0030.00317.45
8.0.250.0030.00317.13
8.0.240.0030.00317.25
8.0.230.0000.00717.18
8.0.220.0000.00717.08
8.0.210.0050.00217.10
8.0.200.0000.00817.22
8.0.190.0040.00417.25
8.0.180.0040.00417.10
8.0.170.0000.00717.08
8.0.160.0040.00417.05
8.0.150.0000.00716.98
8.0.140.0040.00417.03
8.0.130.0000.00513.53
8.0.120.0060.00317.13
8.0.110.0040.00417.16
8.0.100.0000.00717.19
8.0.90.0040.00417.07
8.0.80.0170.00617.11
8.0.70.0040.00417.06
8.0.60.0040.00417.23
8.0.50.0000.00717.04
8.0.30.0080.01117.33
8.0.20.0130.01117.40
8.0.10.0050.00317.05
8.0.00.0140.00616.90
7.4.330.0020.00215.00
7.4.320.0030.00316.79
7.4.300.0030.00316.80
7.4.290.0000.00816.87
7.4.280.0050.00316.74
7.4.270.0030.00316.88
7.4.260.0070.00016.79
7.4.250.0080.00016.83
7.4.240.0040.00316.84
7.4.230.0030.00316.69
7.4.220.0120.00617.03
7.4.210.0060.00716.96
7.4.200.0080.00016.69
7.4.190.0070.00017.02
7.4.160.0120.00416.89
7.4.150.0110.00717.40
7.4.140.0120.00717.86
7.4.130.0110.00816.85
7.4.120.0110.00916.86
7.4.110.0160.00616.85
7.4.100.0100.01316.90
7.4.90.0090.01216.93
7.4.80.0060.01319.39
7.4.70.0170.00416.85
7.4.60.0140.00316.69
7.4.50.0030.00616.97
7.4.40.0100.00716.79
7.4.30.0110.00516.88
7.4.00.0090.00615.19
7.3.330.0000.00513.51
7.3.320.0020.00313.63
7.3.310.0030.00316.51
7.3.300.0030.00316.66
7.3.290.0090.00616.56
7.3.280.0140.00416.59
7.3.270.0080.00917.40
7.3.260.0130.00416.82
7.3.250.0120.00416.80
7.3.240.0140.00316.86
7.3.230.0140.00316.77
7.3.210.0070.01016.64
7.3.200.0140.00319.39
7.3.190.0160.00316.80
7.3.180.0100.00616.59
7.3.170.0100.00716.63
7.3.160.0070.01016.60
7.3.120.0030.01215.14
7.3.10.0070.00717.04
7.3.00.0120.00416.68
7.2.330.0030.01317.06
7.2.320.0140.00416.98
7.2.310.0120.00617.07
7.2.300.0060.01216.88
7.2.290.0110.00817.01
7.2.130.0070.01417.09
7.2.120.0080.00817.33
7.2.110.0060.01017.27
7.2.100.0030.01417.00
7.2.90.0090.00617.12
7.2.80.0100.00617.26
7.2.70.0160.00617.39
7.2.60.0030.01217.29
7.2.50.0040.01517.29
7.2.40.0070.01117.29
7.2.30.0140.00017.05
7.2.20.0090.00917.12
7.2.10.0090.00917.04
7.2.00.0060.01018.54
7.1.250.0070.01016.02
7.1.100.0100.00618.64
7.1.70.0040.00417.55
7.1.60.0100.01419.46
7.1.50.0170.01017.38
7.1.00.0030.07722.28
7.0.200.0030.00517.13
7.0.140.0070.07021.99
7.0.100.0070.08319.90
7.0.90.0030.08320.03
7.0.80.0170.08320.02
7.0.70.0170.06319.81
7.0.60.0130.07719.89
7.0.50.0330.06320.32
7.0.40.0130.07720.14
7.0.30.0100.07720.18
7.0.20.0030.08719.96
7.0.10.0030.04020.16
7.0.00.0100.08320.04
5.6.280.0030.07020.91
5.6.250.0030.07320.73
5.6.240.0070.04720.68
5.6.230.0030.05720.63
5.6.220.0070.09020.53
5.6.210.0070.08320.46
5.6.200.0070.08721.04
5.6.190.0200.07021.14
5.6.180.0030.09320.95
5.6.170.0130.06320.95
5.6.160.0070.06021.11
5.6.150.0170.03321.03
5.6.140.0130.08021.02
5.6.130.0100.08021.13
5.6.120.0070.04721.03
5.6.110.0170.07721.04
5.6.100.0070.08021.08
5.6.90.0170.05321.06
5.6.80.0030.06020.47
5.6.70.0030.08020.42
5.6.60.0030.04720.39
5.6.50.0070.08320.51
5.6.40.0100.07320.46
5.6.30.0200.06720.41
5.6.20.0070.07720.43
5.6.10.0070.06720.29
5.6.00.0070.07720.35
5.5.380.0100.07020.46
5.5.370.0100.07320.46
5.5.360.0100.07020.54
5.5.350.0100.04320.47
5.5.340.0100.07720.87
5.5.330.0100.07720.87
5.5.320.0030.09320.88
5.5.310.0130.07720.77
5.5.300.0100.07320.80
5.5.290.0070.04020.89
5.5.280.0030.08720.87
5.5.270.0070.08320.79
5.5.260.0030.05020.86
5.5.250.0030.04020.70
5.5.240.0130.06320.28
5.5.230.0130.04320.32
5.5.220.0130.06720.30
5.5.210.0130.07320.27
5.5.200.0100.07320.27
5.5.190.0030.08720.25
5.5.180.0030.04020.25
5.5.160.0000.04020.24
5.5.150.0070.06020.08
5.5.140.0130.03020.11
5.5.130.0130.04320.18
5.5.120.0130.07720.22
5.5.110.0100.03720.27
5.5.100.0070.06320.14
5.5.90.0170.06020.07
5.5.80.0030.06720.16
5.5.70.0000.05020.09
5.5.60.0100.07020.16
5.5.50.0170.07020.14
5.5.40.0070.07320.07
5.5.30.0030.06720.03
5.5.20.0070.08020.05
5.5.10.0070.07719.97
5.5.00.0100.06720.04
5.4.450.0100.05719.52
5.4.440.0100.05319.53
5.4.430.0000.04019.55
5.4.420.0170.07019.48
5.4.410.0000.08319.23
5.4.400.0070.08718.88
5.4.390.0100.06718.95
5.4.380.0100.07318.93
5.4.370.0100.05719.12
5.4.360.0030.04719.03
5.4.350.0130.06719.20
5.4.340.0130.06318.85
5.4.320.0070.04018.97
5.4.310.0100.07019.23
5.4.300.0070.07719.12
5.4.290.0100.06019.03
5.4.280.0030.04018.87
5.4.270.0030.08018.87
5.4.260.0070.07319.22
5.4.250.0130.06018.87
5.4.240.0130.07019.03
5.4.230.0030.07719.14
5.4.220.0070.06719.09
5.4.210.0100.07318.89
5.4.200.0070.05719.15
5.4.190.0100.07319.19
5.4.180.0070.05319.02
5.4.170.0070.06718.89
5.4.160.0100.07319.03
5.4.150.0070.07719.03
5.4.140.0070.07016.25
5.4.130.0170.06716.51
5.4.120.0100.07316.37
5.4.110.0130.06016.56
5.4.100.0030.09016.42
5.4.90.0070.05316.52
5.4.80.0030.03716.36
5.4.70.0030.04316.43
5.4.60.0070.07316.37
5.4.50.0070.07016.38
5.4.40.0070.03716.48
5.4.30.0070.04016.33
5.4.20.0030.07016.39
5.4.10.0070.07316.43
5.4.00.0070.06715.89
5.3.290.0130.04014.70
5.3.280.0030.04014.66
5.3.270.0030.07014.66
5.3.260.0030.07714.62
5.3.250.0130.07014.63
5.3.240.0000.08014.54
5.3.230.0170.04014.66
5.3.220.0000.04014.64
5.3.210.0070.06714.63
5.3.200.0030.04714.59
5.3.190.0030.04314.58
5.3.180.0170.06014.49
5.3.170.0030.05014.48
5.3.160.0100.07314.65
5.3.150.0070.07714.58
5.3.140.0100.07314.51
5.3.130.0100.07714.68
5.3.120.0070.06714.53
5.3.110.0100.07014.52
5.3.100.0070.03714.07
5.3.90.0030.07014.13
5.3.80.0100.07714.00
5.3.70.0100.06014.14
5.3.60.0070.06713.99
5.3.50.0070.07013.89
5.3.40.0070.07314.02
5.3.30.0070.06714.00
5.3.20.0100.07013.69
5.3.10.0130.06713.79
5.3.00.0000.08013.69
5.2.170.0070.05711.72
5.2.160.0100.05711.72
5.2.150.0030.03311.72
5.2.140.0030.04011.72
5.2.130.0000.06011.72
5.2.120.0070.03011.72
5.2.110.0070.04711.72
5.2.100.0070.06311.72
5.2.90.0200.04711.72
5.2.80.0030.03011.72
5.2.70.0130.05011.72
5.2.60.0030.06011.72
5.2.50.0100.02711.72
5.2.40.0000.04311.72
5.2.30.0030.05311.72
5.2.20.0030.05311.72
5.2.10.0070.04311.72
5.2.00.0070.06011.72
5.1.60.0030.04311.72
5.1.50.0030.04711.72
5.1.40.0070.04311.72
5.1.30.0030.03311.72
5.1.20.0070.05711.72
5.1.10.0070.05711.72
5.1.00.0030.04711.72
5.0.50.0100.01311.72
5.0.40.0030.02011.72
5.0.30.0070.02711.72
5.0.20.0070.02011.72
5.0.10.0030.01711.72
5.0.00.0030.03011.72
4.4.90.0000.02311.72
4.4.80.0030.02311.72
4.4.70.0000.02011.72
4.4.60.0030.01711.72
4.4.50.0170.01311.72
4.4.40.0000.04011.72
4.4.30.0000.02311.72
4.4.20.0030.03311.72
4.4.10.0070.01311.72
4.4.00.0030.02311.72
4.3.110.0000.01711.72
4.3.100.0070.01311.72
4.3.90.0030.01711.72
4.3.80.0000.02711.72
4.3.70.0000.01311.72
4.3.60.0000.01711.72
4.3.50.0000.01711.72
4.3.40.0030.02011.72
4.3.30.0000.01711.72
4.3.20.0030.01311.72
4.3.10.0000.01711.72
4.3.00.0000.01711.72

preferences:
33.23 ms | 403 KiB | 5 Q