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'); $str = 'F\u00f6retag: Betalning'; /*echo utils::replace_unicode_escape_sequence($str);*/ echo unicode_escape_sequences($str); 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.0210.00016.63
8.3.50.0050.01322.05
8.3.40.0060.00918.97
8.3.30.0070.00719.05
8.3.20.0040.00420.28
8.3.10.0000.00723.62
8.3.00.0080.00020.73
8.2.180.0090.00916.63
8.2.170.0060.00922.96
8.2.160.0070.00720.35
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0080.00020.53
8.2.110.0000.00922.42
8.2.100.0070.00717.96
8.2.90.0040.00419.28
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0040.00417.90
8.2.50.0060.00318.07
8.2.40.0000.00820.01
8.2.30.0030.00618.23
8.2.20.0000.00817.77
8.2.10.0020.00518.11
8.2.00.0040.00417.86
8.1.280.0180.00325.92
8.1.270.0030.00523.84
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.04
8.1.230.0000.01119.16
8.1.220.0000.00817.91
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0030.00517.22
8.1.180.0000.00819.14
8.1.170.0090.00018.56
8.1.160.0050.00221.96
8.1.150.0040.00418.67
8.1.140.0110.00017.60
8.1.130.0030.00317.80
8.1.120.0040.00417.58
8.1.110.0030.00717.58
8.1.100.0000.00717.52
8.1.90.0000.00717.45
8.1.80.0070.00417.62
8.1.70.0030.00317.45
8.1.60.0040.00417.66
8.1.50.0020.00517.68
8.1.40.0030.00717.63
8.1.30.0000.00817.83
8.1.20.0040.00417.85
8.1.10.0050.00217.59
8.1.00.0000.00817.48
8.0.300.0000.00818.77
8.0.290.0000.00817.16
8.0.280.0000.00718.50
8.0.270.0000.00717.29
8.0.260.0000.00617.30
8.0.250.0000.00717.02
8.0.240.0000.00717.06
8.0.230.0000.00717.02
8.0.220.0030.00316.99
8.0.210.0030.00317.02
8.0.200.0080.00017.06
8.0.190.0050.00217.12
8.0.180.0000.00816.95
8.0.170.0070.00017.01
8.0.160.0070.00016.94
8.0.150.0070.00016.94
8.0.140.0030.00516.88
8.0.130.0000.00613.48
8.0.120.0080.00016.85
8.0.110.0030.00317.04
8.0.100.0030.00516.95
8.0.90.0000.00716.87
8.0.80.0090.01316.97
8.0.70.0050.00317.12
8.0.60.0040.00416.86
8.0.50.0000.00717.00
8.0.30.0080.01017.24
8.0.20.0120.01217.40
8.0.10.0040.00416.99
8.0.00.0090.00916.86
7.4.330.0000.00515.00
7.4.320.0000.00616.61
7.4.300.0000.00616.65
7.4.290.0070.00016.74
7.4.280.0000.00816.87
7.4.270.0040.00416.82
7.4.260.0070.00016.81
7.4.250.0050.00316.75
7.4.240.0010.00616.75
7.4.230.0000.00716.71
7.4.220.0110.00716.82
7.4.210.0100.00816.83
7.4.200.0040.00316.63
7.4.190.0070.00016.89
7.4.160.0080.00816.69
7.4.150.0100.00717.40
7.4.140.0060.01217.86
7.4.130.0100.01216.66
7.4.120.0090.00916.67
7.4.110.0110.00716.86
7.4.100.0100.01016.64
7.4.90.0090.00916.49
7.4.80.0080.01619.39
7.4.70.0120.00616.78
7.4.60.0060.01216.64
7.4.50.0030.00316.82
7.4.40.0120.01116.70
7.4.30.0060.01016.59
7.4.00.0090.00915.01
7.3.330.0060.00013.26
7.3.320.0000.00513.39
7.3.310.0030.00516.36
7.3.300.0030.00316.23
7.3.290.0030.01216.39
7.3.280.0120.00716.38
7.3.270.0140.00317.40
7.3.260.0100.00716.77
7.3.250.0060.01316.60
7.3.240.0070.01116.47
7.3.230.0080.00816.44
7.3.210.0130.00316.63
7.3.200.0180.00319.39
7.3.190.0090.01216.46
7.3.180.0090.00616.45
7.3.170.0210.00016.59
7.3.160.0070.01016.72
7.3.120.0030.01214.99
7.2.330.0140.00416.78
7.2.320.0070.01116.75
7.2.310.0140.00316.95
7.2.300.0110.00716.88
7.2.290.0060.01316.66
7.2.110.0120.01216.73
7.1.200.0120.00015.92
7.1.70.0050.00517.39
7.1.60.0130.01019.46
7.1.50.0210.00716.84
7.1.00.0100.07022.37
7.0.200.0050.00216.86
7.0.140.0030.07322.10
7.0.90.0570.08319.95
7.0.80.0570.04319.88
7.0.70.0630.08019.95
7.0.60.0570.07719.95
7.0.50.0530.05320.33
7.0.40.0000.08320.14
7.0.30.0070.08020.18
7.0.20.0030.04720.11
7.0.10.0070.04720.09
7.0.00.0070.07319.95
5.6.280.0070.07021.00
5.6.240.0030.04720.70
5.6.230.0030.04720.60
5.6.220.0070.07720.68
5.6.210.0070.04020.76
5.6.200.0070.07721.09
5.6.190.0100.07321.03
5.6.180.0170.07021.00
5.6.170.0070.07321.09
5.6.160.0070.07321.05
5.6.150.0030.08021.14
5.6.140.0030.07321.02
5.6.130.0070.04321.04
5.6.120.0130.07320.95
5.6.110.0130.07320.94
5.6.100.0070.05321.02
5.6.90.0100.07721.07
5.6.80.0130.06720.48
5.6.70.0100.08020.47
5.6.60.0100.06320.38
5.6.50.0000.05320.57
5.6.40.0070.07020.38
5.6.30.0200.06320.30
5.6.20.0100.06720.54
5.6.10.0070.08320.44
5.6.00.0070.08320.37
5.5.380.0170.06720.43
5.5.370.0000.08720.38
5.5.360.0070.04720.35
5.5.350.0030.07320.40
5.5.340.0000.08320.82
5.5.330.0100.07720.84
5.5.320.0070.05320.88
5.5.310.0070.05320.75
5.5.300.0030.04320.94
5.5.290.0100.05020.88
5.5.280.0030.05320.63
5.5.270.0070.07720.90
5.5.260.0100.08020.89
5.5.250.0070.05020.63
5.5.240.0100.04720.29
5.5.230.0070.07320.14
5.5.220.0000.06320.16
5.5.210.0000.06720.22
5.5.200.0070.08320.29
5.5.190.0030.08020.25
5.5.180.0170.07020.10
5.5.160.0070.08320.13
5.5.150.0070.05320.27
5.5.140.0170.05720.22
5.5.130.0100.05720.09
5.5.120.0100.03720.28
5.5.110.0030.04320.25
5.5.100.0000.05320.12
5.5.90.0000.06020.17
5.5.80.0170.06320.05
5.5.70.0130.06720.08
5.5.60.0030.08020.15
5.5.50.0000.08320.09
5.5.40.0200.07020.14
5.5.30.0030.06319.95
5.5.20.0070.08020.16
5.5.10.0030.06320.01
5.5.00.0070.08020.04
5.4.450.0030.08019.46
5.4.440.0100.07019.20
5.4.430.0100.07719.29
5.4.420.0030.08719.38
5.4.410.0130.06019.32
5.4.400.0070.05019.15
5.4.390.0070.07318.88
5.4.380.0130.07019.03
5.4.370.0030.07719.18
5.4.360.0000.08018.95
5.4.350.0100.07319.18
5.4.340.0100.07319.16
5.4.320.0070.05019.14
5.4.310.0030.08019.16
5.4.300.0030.06019.17
5.4.290.0000.08019.18
5.4.280.0070.07019.04
5.4.270.0030.07319.02
5.4.260.0030.08018.87
5.4.250.0170.06718.89
5.4.240.0000.08719.11
5.4.230.0070.05718.90
5.4.220.0070.08019.02
5.4.210.0070.05319.03
5.4.200.0170.04019.12
5.4.190.0100.06018.86
5.4.180.0130.03719.11
5.4.170.0130.07019.03
5.4.160.0000.04319.19
5.4.150.0070.08019.21
5.4.140.0100.03716.47
5.4.130.0170.06016.20
5.4.120.0070.04316.46
5.4.110.0000.08016.45
5.4.100.0000.07316.49
5.4.90.0030.04716.42
5.4.80.0030.06016.47
5.4.70.0130.06316.36
5.4.60.0200.05716.45
5.4.50.0030.06016.51
5.4.40.0070.07016.53
5.4.30.0070.06316.36
5.4.20.0070.07316.40
5.4.10.0100.07016.44
5.4.00.0030.05715.59
5.3.290.0100.03314.74
5.3.280.0030.07714.66
5.3.270.0100.04714.68
5.3.260.0070.05014.61
5.3.250.0030.04714.67
5.3.240.0100.06714.68
5.3.230.0070.05014.66
5.3.220.0030.07314.64
5.3.210.0070.07714.64
5.3.200.0030.07714.57
5.3.190.0030.08314.55
5.3.180.0100.07014.61
5.3.170.0030.07714.64
5.3.160.0030.04714.63
5.3.150.0230.05314.67
5.3.140.0100.03314.52
5.3.130.0130.06714.63
5.3.120.0130.07014.65
5.3.110.0030.05714.61
5.3.100.0130.06014.06
5.3.90.0030.08014.09
5.3.80.0000.05313.93
5.3.70.0070.08014.05
5.3.60.0030.07713.91
5.3.50.0100.07014.06
5.3.40.0030.07313.98
5.3.30.0100.05713.99
5.3.20.0130.03313.69
5.3.10.0100.06013.70
5.3.00.0070.05313.55
5.2.170.0030.05011.20
5.2.160.0030.04311.05
5.2.150.0070.06311.14
5.2.140.0030.06311.04
5.2.130.0030.03010.98
5.2.120.0000.03310.96
5.2.110.0100.05711.19
5.2.100.0100.06011.14
5.2.90.0070.05711.11
5.2.80.0070.06311.20
5.2.70.0030.04311.23
5.2.60.0070.06011.16
5.2.50.0000.05711.05
5.2.40.0070.06011.05
5.2.30.0070.03011.02
5.2.20.0000.05710.91
5.2.10.0030.06011.00
5.2.00.0100.05010.77
5.1.60.0000.04010.77
5.1.50.0070.03310.77
5.1.40.0000.05710.77
5.1.30.0070.05310.77
5.1.20.0030.04710.77
5.1.10.0070.02710.77
5.1.00.0070.05010.77
5.0.50.0070.03310.77
5.0.40.0070.04010.77
5.0.30.0000.06710.77
5.0.20.0030.04310.77
5.0.10.0000.05010.77
5.0.00.0030.06010.77
4.4.90.0000.02310.77
4.4.80.0030.03310.77
4.4.70.0030.02710.77
4.4.60.0030.03310.77
4.4.50.0070.03010.77
4.4.40.0000.03010.77
4.4.30.0100.02710.77
4.4.20.0000.02710.77
4.4.10.0070.03310.77
4.4.00.0000.04010.77
4.3.110.0100.01010.77
4.3.100.0100.02310.77
4.3.90.0070.03010.77
4.3.80.0030.04710.77
4.3.70.0070.03010.77
4.3.60.0000.03310.77
4.3.50.0030.02710.77
4.3.40.0030.04310.77
4.3.30.0000.03710.77
4.3.20.0000.03310.77
4.3.10.0000.03710.77
4.3.00.0000.03310.77

preferences:
37.64 ms | 401 KiB | 5 Q