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=iso-8859-1'); $strs = 'F\u00f6retag: Betalning'; /*echo utils::replace_unicode_escape_sequence($str);*/ echo unicode_escape_sequences($strs); function unicode_escape_sequences($str){ $working = json_encode($str); $working = preg_replace('/\\\u([0-9a-z]{4})/', '&#x$1;', $working); return json_decode($working); }

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.0090.00616.75
8.3.50.0100.00822.03
8.3.40.0120.00918.79
8.3.30.0190.00319.09
8.3.20.0050.00320.16
8.3.10.0080.00023.54
8.3.00.0040.00420.95
8.2.180.0090.00617.00
8.2.170.0070.00722.96
8.2.160.0100.00720.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00720.34
8.2.110.0060.00322.41
8.2.100.0090.00317.72
8.2.90.0080.00019.08
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0070.00317.90
8.2.50.0060.00618.07
8.2.40.0060.00319.95
8.2.30.0020.00518.29
8.2.20.0080.00017.73
8.2.10.0000.00718.03
8.2.00.0000.00817.78
8.1.280.0070.01125.92
8.1.270.0080.00022.04
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.82
8.1.230.0050.00519.00
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0060.00317.23
8.1.190.0030.00517.35
8.1.180.0050.00318.10
8.1.170.0000.00818.59
8.1.160.0000.00722.01
8.1.150.0000.00818.81
8.1.140.0060.00317.67
8.1.130.0000.00917.87
8.1.120.0000.00817.52
8.1.110.0000.00917.60
8.1.100.0000.00817.47
8.1.90.0000.00717.43
8.1.80.0040.00417.52
8.1.70.0000.00717.48
8.1.60.0040.00417.75
8.1.50.0040.00417.65
8.1.40.0060.00317.66
8.1.30.0050.00317.67
8.1.20.0070.00017.85
8.1.10.0000.00817.71
8.1.00.0000.00817.57
8.0.300.0000.00818.77
8.0.290.0000.00717.16
8.0.280.0000.00718.36
8.0.270.0070.00017.24
8.0.260.0030.00317.29
8.0.250.0040.00417.07
8.0.240.0070.00017.05
8.0.230.0000.00717.02
8.0.220.0040.00416.91
8.0.210.0000.00716.98
8.0.200.0000.00717.10
8.0.190.0030.00516.96
8.0.180.0070.00017.02
8.0.170.0000.00816.98
8.0.160.0000.00717.02
8.0.150.0050.00216.96
8.0.140.0080.00016.89
8.0.130.0030.00313.51
8.0.120.0080.00016.97
8.0.110.0000.00817.04
8.0.100.0080.00016.83
8.0.90.0070.00016.88
8.0.80.0080.00817.06
8.0.70.0050.00217.03
8.0.60.0000.00717.02
8.0.50.0000.00717.10
8.0.30.0120.00616.94
8.0.20.0120.00817.40
8.0.10.0040.00417.00
8.0.00.0060.01316.94
7.4.330.0030.00315.00
7.4.320.0040.00416.83
7.4.300.0000.00716.80
7.4.290.0000.00816.84
7.4.280.0060.00316.73
7.4.270.0040.00316.69
7.4.260.0030.00416.68
7.4.250.0070.00016.78
7.4.240.0070.00016.78
7.4.230.0070.00016.90
7.4.220.0040.01416.68
7.4.210.0090.00716.84
7.4.200.0000.00716.73
7.4.190.0000.00716.80
7.4.160.0090.01216.61
7.4.150.0110.00717.40
7.4.140.0100.00917.86
7.4.130.0100.00716.76
7.4.120.0080.00816.87
7.4.110.0000.01916.89
7.4.100.0120.00616.83
7.4.90.0030.01716.86
7.4.80.0160.01019.39
7.4.70.0090.00916.88
7.4.60.0070.01016.55
7.4.50.0040.00416.75
7.4.40.0160.00016.72
7.4.30.0130.00916.79
7.4.00.0070.00915.20
7.3.330.0000.00513.21
7.3.320.0050.00013.20
7.3.310.0000.00716.40
7.3.300.0050.00316.40
7.3.290.0080.00816.37
7.3.280.0090.01116.39
7.3.270.0160.00617.40
7.3.260.0090.01516.39
7.3.250.0120.00616.39
7.3.240.0110.00616.38
7.3.230.0130.00316.71
7.3.210.0090.01316.45
7.3.200.0150.00919.39
7.3.190.0030.01916.66
7.3.180.0080.00816.33
7.3.170.0200.00316.48
7.3.160.0030.01216.84
7.3.120.0080.00715.00
7.3.110.0050.01215.08
7.3.100.0080.00914.96
7.3.90.0000.01115.01
7.3.80.0040.00814.66
7.3.70.0090.00514.91
7.3.60.0060.00814.88
7.3.50.0030.00715.01
7.3.40.0060.01014.86
7.3.30.0000.01315.01
7.3.20.0070.00516.82
7.3.10.0060.00816.75
7.3.00.0090.00616.70
7.2.330.0100.01016.85
7.2.320.0040.01616.82
7.2.310.0090.00916.79
7.2.300.0090.00616.74
7.2.290.0070.01116.84
7.2.250.0080.00915.30
7.2.240.0100.01215.21
7.2.230.0060.00815.31
7.2.220.0060.00615.18
7.2.210.0070.01015.15
7.2.200.0030.01215.11
7.2.190.0050.00915.17
7.2.180.0050.01115.03
7.2.170.0060.01015.02
7.2.130.0040.00817.18
7.2.120.0040.00416.93
7.2.110.0080.00316.78
7.2.100.0120.00416.77
7.2.90.0070.00316.88
7.2.80.0070.00717.10
7.2.70.0120.00417.08
7.2.60.0000.01117.21
7.2.50.0110.00417.06
7.2.40.0110.00617.07
7.2.30.0040.00716.95
7.2.20.0080.00416.98
7.2.10.0000.01017.05
7.2.00.0100.00618.28
7.1.330.0080.00716.00
7.1.320.0050.00715.83
7.1.310.0050.01016.08
7.1.300.0060.00915.79
7.1.290.0050.01015.78
7.1.280.0070.00915.73
7.1.270.0060.00515.87
7.1.260.0080.00615.81
7.1.250.0060.00916.06
7.1.200.0030.01015.92
7.1.100.0110.01118.20
7.1.70.0040.00417.23
7.1.60.0140.01019.46
7.1.50.0120.01216.92
7.1.00.0070.07322.33
7.0.200.0050.00316.86
7.0.140.0030.07322.00
7.0.90.0800.07319.92
7.0.80.0500.04719.94
7.0.70.0430.09019.98
7.0.60.0470.06020.01
7.0.50.0570.05020.33
7.0.40.0070.08020.04
7.0.30.0030.09020.14
7.0.20.0130.05720.05
7.0.10.0200.07320.10
7.0.00.0070.08320.02
5.6.280.0070.07020.93
5.6.240.0070.08020.65
5.6.230.0170.04020.76
5.6.220.0070.08720.58
5.6.210.0130.07320.54
5.6.200.0170.08020.98
5.6.190.0170.06721.13
5.6.180.0100.08021.10
5.6.170.0030.07321.03
5.6.160.0070.04721.06
5.6.150.0070.07321.05
5.6.140.0070.08320.95
5.6.130.0070.08721.02
5.6.120.0100.08320.96
5.6.110.0130.07321.05
5.6.100.0100.08021.06
5.6.90.0030.08021.10
5.6.80.0000.04320.45
5.6.70.0000.04320.42
5.6.60.0000.03720.40
5.6.50.0000.04320.47
5.6.40.0070.03720.48
5.6.30.0030.03720.32
5.6.20.0070.03720.47
5.6.10.0000.04320.29
5.6.00.0070.03720.31
5.5.380.0070.07320.43
5.5.370.0200.07020.43
5.5.360.0100.08020.50
5.5.350.0100.04020.47
5.5.340.0070.06020.75
5.5.330.0030.06020.93
5.5.320.0070.08020.64
5.5.310.0030.08320.94
5.5.300.0030.09020.93
5.5.290.0070.06320.89
5.5.280.0100.05720.74
5.5.270.0100.08720.73
5.5.260.0000.08720.74
5.5.250.0130.03320.73
5.5.240.0070.07320.25
5.5.230.0030.04020.19
5.5.220.0030.04020.03
5.5.210.0070.03720.20
5.5.200.0030.04020.24
5.5.190.0070.03720.23
5.5.180.0030.03720.23
5.5.160.0100.03320.27
5.5.150.0030.04020.25
5.5.140.0100.05720.25
5.5.130.0030.04020.27
5.5.120.0030.03320.23
5.5.110.0070.03720.15
5.5.100.0000.06320.14
5.5.90.0030.04020.08
5.5.80.0070.06019.98
5.5.70.0070.04320.07
5.5.60.0070.07020.01
5.5.50.0000.04720.07
5.5.40.0070.04020.17
5.5.30.0030.03720.06
5.5.20.0070.03720.06
5.5.10.0030.04320.03
5.5.00.0070.03020.06
5.4.450.0070.05019.42
5.4.440.0130.06719.33
5.4.430.0100.07019.53
5.4.420.0100.07319.35
5.4.410.0070.04019.33
5.4.400.0000.04018.95
5.4.390.0070.03719.04
5.4.380.0030.04019.13
5.4.370.0070.03019.14
5.4.360.0000.04019.04
5.4.350.0070.03319.16
5.4.340.0030.04319.16
5.4.320.0000.04019.15
5.4.310.0100.05318.95
5.4.300.0130.02719.13
5.4.290.0000.04018.90
5.4.280.0030.03318.90
5.4.270.0030.07318.95
5.4.260.0000.04318.90
5.4.250.0030.03318.87
5.4.240.0070.03719.08
5.4.230.0100.02719.13
5.4.220.0000.04019.12
5.4.210.0070.03318.86
5.4.200.0070.04019.04
5.4.190.0000.05719.08
5.4.180.0000.04319.08
5.4.170.0030.03719.08
5.4.160.0070.03319.07
5.4.150.0070.03719.18
5.4.140.0100.05016.50
5.4.130.0070.03316.43
5.4.120.0030.03716.46
5.4.110.0030.03716.56
5.4.100.0030.03716.56
5.4.90.0070.03316.52
5.4.80.0030.07016.55
5.4.70.0030.06316.42
5.4.60.0030.07016.30
5.4.50.0070.07016.40
5.4.40.0130.06316.35
5.4.30.0100.06716.45
5.4.20.0100.07016.36
5.4.10.0030.06716.47
5.4.00.0070.05315.70
5.3.290.0000.05014.61
5.3.280.0000.04314.63
5.3.270.0030.03714.76
5.3.260.0030.03714.59
5.3.250.0000.04014.68
5.3.240.0000.04014.59
5.3.230.0030.03714.73
5.3.220.0070.03314.60
5.3.210.0070.06014.67
5.3.200.0030.03714.57
5.3.190.0030.04714.65
5.3.180.0130.04314.70
5.3.170.0070.04714.52
5.3.160.0130.03714.53
5.3.150.0070.05014.54
5.3.140.0070.04314.60
5.3.130.0070.07314.59
5.3.120.0170.05714.58
5.3.110.0100.07714.58
5.3.100.0100.07014.16
5.3.90.0100.06014.05
5.3.80.0030.07714.12
5.3.70.0000.08014.04
5.3.60.0070.07314.04
5.3.50.0100.05014.03
5.3.40.0000.07714.10
5.3.30.0070.04313.90
5.3.20.0070.07013.77
5.3.10.0100.06713.65
5.3.00.0000.05013.68
5.2.170.0000.03711.15
5.2.160.0100.05711.25
5.2.150.0030.07011.03
5.2.140.0070.03011.13
5.2.130.0070.03711.14
5.2.120.0030.04311.13
5.2.110.0000.06311.02
5.2.100.0000.06311.15
5.2.90.0000.06711.11
5.2.80.0030.05311.22
5.2.70.0000.04011.09
5.2.60.0070.05311.09
5.2.50.0000.05310.90
5.2.40.0000.04310.86
5.2.30.0130.05311.07
5.2.20.0070.04011.05
5.2.10.0000.05710.88
5.2.00.0070.05310.86
5.1.60.0070.0639.85
5.1.50.0030.0339.84
5.1.40.0000.04310.04
5.1.30.0130.05010.24
5.1.20.0070.05010.34
5.1.10.0030.04710.11
5.1.00.0100.0509.96
5.0.50.0100.0408.38
5.0.40.0070.0408.47
5.0.30.0070.0438.32
5.0.20.0030.0208.28
5.0.10.0000.0238.29
5.0.00.0030.0538.15
4.4.90.0070.0337.29
4.4.80.0030.0337.29
4.4.70.0030.0307.29
4.4.60.0030.0337.29
4.4.50.0070.0337.29
4.4.40.0070.0407.29
4.4.30.0130.0207.29
4.4.20.0030.0277.29
4.4.10.0030.0377.29
4.4.00.0030.0507.29
4.3.110.0030.0277.29
4.3.100.0000.0377.29
4.3.90.0000.0207.29
4.3.80.0100.0377.29
4.3.70.0000.0377.29
4.3.60.0030.0307.29
4.3.50.0000.0337.29
4.3.40.0000.0577.29
4.3.30.0000.0377.29
4.3.20.0030.0337.29
4.3.10.0000.0337.29
4.3.00.0030.0277.29

preferences:
41.83 ms | 401 KiB | 5 Q