3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decode($data, $encoding) { // convert string if (is_string($data)) { if (function_exists('iconv')) { // iconv is by far the most flexible approach, try this first $return_value = iconv('UTF-8', $encoding, $data); } elseif ($encoding == 'ISO-8859-1') { // for ISO-8859-1 we can use utf8-decode() $return_value = utf8_decode($data); } else { // give up. if data was supplied in the correct format everything is fine! $return_value = $data; } // end: if } else { // non-string value $return_value = $data; } // end: if return $return_value; } $response = "0;78d13qqoglyszmorspfwfdmwffgnubgr;\u003c?dpf sent len=\"1\"?\u003e\u003c?dpf orth code=\"unknown\" prop=\"Lesen;Lehnen;Lehren;Leasen;Leisen\" ?\u003elehsen\u003c?dpf /orth ?\u003e~~~\u003c?dpf /sent ?\u003e"; //$response = str_replace("\u003c", "<", $response); //$response = str_replace("\u003e", ">", $response); $response = preg_replace("/\\\\u([0-9a-f]{3,4})/i", "&#x\\1;", $response ); $response = html_entity_decode($response , null, 'UTF-8'); $response = str_replace([ '<?dpf ', ' ?>', '?>' ], [ '<', '>', '>' ], $response); echo $response;

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.0120.00616.63
8.3.50.0100.01019.79
8.3.40.0120.00318.92
8.3.30.0040.01118.88
8.3.20.0070.00020.20
8.3.10.0040.00423.83
8.3.00.0000.00819.63
8.2.180.0100.00718.79
8.2.170.0120.00322.96
8.2.160.0030.01020.38
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0080.00021.21
8.2.110.0060.00320.35
8.2.100.0040.00718.22
8.2.90.0050.00519.23
8.2.80.0000.00817.97
8.2.70.0030.00717.63
8.2.60.0040.00417.93
8.2.50.0030.00718.07
8.2.40.0090.00018.15
8.2.30.0050.00218.02
8.2.20.0050.00317.99
8.2.10.0040.00418.21
8.2.00.0050.00317.98
8.1.270.0090.00023.79
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00522.20
8.1.230.0110.00018.94
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0000.00917.23
8.1.190.0050.00317.47
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0050.00321.92
8.1.150.0050.00318.75
8.1.140.0040.00417.48
8.1.130.0030.00317.79
8.1.120.0050.00217.55
8.1.110.0050.00317.58
8.1.100.0000.00817.59
8.1.90.0040.00317.53
8.1.80.0050.00317.43
8.1.70.0050.00217.44
8.1.60.0030.00617.66
8.1.50.0040.00417.59
8.1.40.0090.00017.55
8.1.30.0050.00317.64
8.1.20.0050.00217.76
8.1.10.0000.00917.67
8.1.00.0000.00717.55
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0020.00518.50
8.0.270.0070.00017.22
8.0.260.0030.00317.21
8.0.250.0040.00417.13
8.0.240.0000.00717.12
8.0.230.0000.00717.03
8.0.220.0000.00716.98
8.0.210.0040.00416.99
8.0.200.0050.00316.93
8.0.190.0040.00417.00
8.0.180.0000.00816.98
8.0.170.0030.00616.99
8.0.160.0040.00416.95
8.0.150.0050.00216.95
8.0.140.0070.00316.87
8.0.130.0000.00613.52
8.0.120.0080.00317.01
8.0.110.0000.00716.93
8.0.100.0040.00416.87
8.0.90.0030.00616.89
8.0.80.0040.01216.88
8.0.70.0000.00716.82
8.0.60.0030.00517.03
8.0.50.0000.00816.94
8.0.30.0070.01217.35
8.0.20.0120.00817.40
8.0.10.0020.00517.06
8.0.00.0120.00816.97
7.4.330.0030.00315.06
7.4.320.0000.00716.79
7.4.300.0070.00016.75
7.4.290.0030.00316.78
7.4.280.0000.00716.76
7.4.270.0030.00316.61
7.4.260.0000.00716.66
7.4.250.0000.00816.74
7.4.240.0050.00216.70
7.4.230.0070.00016.86
7.4.220.0070.01116.79
7.4.210.0030.01116.64
7.4.200.0080.00016.61
7.4.160.0090.00916.72
7.4.150.0130.00417.40
7.4.140.0150.00317.86
7.4.130.0080.00916.68
7.4.120.0080.00816.68
7.4.110.0150.00616.71
7.4.100.0100.01416.50
7.4.90.0060.01216.61
7.4.80.0220.00319.39
7.4.70.0110.01316.68
7.4.60.0140.01216.49
7.4.50.0190.00416.54
7.4.40.0190.00716.63
7.4.30.0280.01116.86
7.4.20.0190.01016.48
7.4.10.0260.01416.54
7.4.00.0000.01815.84
7.3.330.0050.00213.26
7.3.320.0040.00413.20
7.3.310.0040.00416.51
7.3.300.0000.00716.40
7.3.290.0030.01016.32
7.3.280.0070.00716.39
7.3.270.0110.00717.40
7.3.260.0180.00016.69
7.3.250.0070.01016.43
7.3.240.0110.00716.42
7.3.230.0100.01416.60
7.3.210.0100.00716.33
7.3.200.0130.00316.47
7.3.190.0130.01316.31
7.3.180.0140.00916.48
7.3.170.0200.00516.65
7.3.160.0190.00616.63
7.3.150.0330.00816.52
7.3.140.0250.01316.22
7.3.130.0210.01716.30
7.3.120.0280.01216.57
7.3.110.0230.01316.41
7.3.100.0390.00616.44
7.3.90.0350.00616.75
7.3.80.0200.01916.58
7.3.70.0220.01416.34
7.3.60.0230.00816.39
7.3.50.0300.00416.39
7.3.40.0390.00316.41
7.3.30.0280.01416.51
7.3.20.0270.00718.21
7.3.10.0190.01118.17
7.3.00.0270.00618.30
7.2.330.0070.01016.67
7.2.320.0100.01316.64
7.2.310.0150.01116.71
7.2.300.0210.00616.75
7.2.290.0160.01216.54
7.2.280.0220.01616.47
7.2.270.0370.00816.73
7.2.260.0260.01916.75
7.2.250.0330.01116.81
7.2.240.0220.01616.45
7.2.230.0270.01316.75
7.2.220.0300.01116.74
7.2.210.0290.01016.83
7.2.200.0220.01116.52
7.2.190.0250.00616.56
7.2.180.0240.01616.57
7.2.170.0310.00916.72
7.2.160.0280.01316.73
7.2.150.0190.01518.59
7.2.140.0270.00818.44
7.2.130.0280.00418.52
7.2.120.0220.00918.40
7.2.110.0280.00718.51
7.2.100.0220.01318.60
7.2.90.0160.01318.49
7.2.80.0160.01218.18
7.2.70.0220.01318.39
7.2.60.0110.01617.55
7.2.50.0180.01818.51
7.2.40.0210.01218.43
7.2.30.0200.01718.44
7.2.20.0200.00818.43
7.2.10.0200.01318.54
7.2.00.0060.01018.70
7.1.330.0320.00917.45
7.1.320.0210.00817.51
7.1.310.0280.00917.51
7.1.300.0240.01217.46
7.1.290.0300.01017.62
7.1.280.0260.01117.63
7.1.270.0350.00217.71
7.1.260.0260.00317.56
7.1.250.0230.01317.48
7.1.240.0320.00417.57
7.1.230.0260.00717.54
7.1.220.0180.01417.50
7.1.210.0260.00917.61
7.1.200.0160.00716.67
7.1.190.0180.01417.47
7.1.180.0230.01217.64
7.1.170.0210.01217.61
7.1.160.0190.01117.48
7.1.150.0300.00317.64
7.1.140.0240.00817.58
7.1.130.0280.00817.52
7.1.120.0200.01117.49
7.1.110.0240.01117.48
7.1.100.0100.01117.92
7.1.90.0170.01317.63
7.1.80.0200.00917.46
7.1.70.0130.00817.46
7.1.60.0190.00818.41
7.1.50.0150.01317.41
7.1.40.0140.01417.49
7.1.30.0200.01117.61
7.1.20.0150.01517.54
7.1.10.0220.01117.59
7.1.00.0150.04019.93
7.0.330.0250.00417.20
7.0.320.0260.00717.34
7.0.310.0240.00817.36
7.0.300.0220.00917.05
7.0.290.0170.01217.06
7.0.280.0180.01517.19
7.0.270.0170.01417.23
7.0.260.0240.01217.36
7.0.250.0200.01017.46
7.0.240.0220.00617.32
7.0.230.0230.00617.29
7.0.220.0250.00417.28
7.0.210.0190.00817.44
7.0.200.0140.00616.92
7.0.190.0200.01017.39
7.0.180.0160.01317.03
7.0.170.0170.00917.13
7.0.160.0130.01317.42
7.0.150.0150.01617.04
7.0.140.0140.04119.58
7.0.130.0180.01217.37
7.0.120.0250.00417.25
7.0.110.0190.01017.02
7.0.100.0200.01417.18
7.0.90.0250.00917.14
7.0.80.0180.01517.23
7.0.70.0280.00717.25
7.0.60.0170.02218.63
7.0.50.0110.03617.57
7.0.40.0110.02618.67
7.0.30.0210.04418.77
7.0.20.0240.03418.73
7.0.10.0200.04018.76
7.0.00.0160.03518.77
5.6.400.0210.01416.11
5.6.390.0250.00715.80
5.6.380.0210.01616.05
5.6.370.0190.01616.09
5.6.360.0240.01015.85
5.6.350.0210.01416.11
5.6.340.0150.01515.87
5.6.330.0270.00816.02
5.6.320.0220.01015.82
5.6.310.0220.00615.63
5.6.300.0250.01316.20
5.6.290.0220.00916.05
5.6.280.0100.04218.23
5.6.270.0200.01016.01
5.6.260.0230.01015.73
5.6.250.0200.01416.07
5.6.240.0150.02115.98
5.6.230.0270.00615.90
5.6.220.0150.01515.78
5.6.210.0160.04618.29
5.6.200.0070.04317.08
5.6.190.0120.04318.17
5.6.180.0290.03218.26
5.6.170.0260.04318.26
5.6.160.0110.03118.23
5.6.150.0130.04517.09
5.6.140.0080.03217.11
5.6.130.0140.03017.19
5.6.120.0170.04218.43
5.6.110.0210.02618.45
5.6.100.0100.05218.49
5.6.90.0120.04918.57
5.6.80.0190.04418.08
5.6.70.0120.01615.72
5.6.60.0210.00915.71
5.6.50.0200.00915.70
5.6.40.0160.01015.74
5.6.30.0200.00716.06
5.6.20.0150.01515.79
5.6.10.0200.01015.79
5.6.00.0200.01015.87
5.5.380.0220.01016.00
5.5.370.0120.01715.96
5.5.360.0260.00715.78
5.5.350.0170.02518.08
5.5.340.0240.02016.99
5.5.330.0160.03518.15
5.5.320.0270.04917.98
5.5.310.0240.03118.20
5.5.300.0130.04416.96
5.5.290.0120.05017.05
5.5.280.0130.03518.32
5.5.270.0150.03718.38
5.5.260.0170.03818.27
5.5.250.0160.04218.32
5.5.240.0190.03118.05
5.5.230.0130.01815.92
5.5.220.0180.00915.91
5.5.210.0200.01315.82
5.5.200.0150.01215.97
5.5.190.0210.00915.95
5.5.180.0150.01515.97
5.5.170.0190.01315.69
5.5.160.0250.00615.87
5.5.150.0140.01815.88
5.5.140.0160.01715.81
5.5.130.0190.01016.06
5.5.120.0230.01015.87
5.5.110.0210.01015.73
5.5.100.0220.01515.88
5.5.90.0200.01215.57
5.5.80.0190.01015.86
5.5.70.0160.01115.73
5.5.60.0300.00315.62
5.5.50.0180.01515.83
5.5.40.0180.01815.73
5.5.30.0130.01315.60
5.5.20.0130.01815.92
5.5.10.0170.01115.79
5.5.00.0170.01415.73
5.4.450.0200.02116.04
5.4.440.0290.02816.12
5.4.430.0260.02316.06
5.4.420.0360.02516.05
5.4.410.0190.03116.07
5.4.400.0100.03015.85
5.4.390.0320.02515.81
5.4.380.0280.02515.60
5.4.370.0260.03115.62
5.4.360.0250.03015.68
5.4.350.0270.02915.76
5.4.340.0280.04115.62
5.4.330.0100.01312.75
5.4.320.0130.02612.54
5.4.310.0130.02712.59
5.4.300.0130.02512.67
5.4.290.0130.02112.56
5.4.280.0130.02012.53
5.4.270.0130.02112.56
5.4.260.0090.02512.58
5.4.250.0080.02412.48
5.4.240.0120.02012.65
5.4.230.0100.02512.59
5.4.220.0120.02512.58
5.4.210.0090.02612.51
5.4.200.0110.02112.62
5.4.190.0120.02312.55
5.4.180.0130.02212.59
5.4.170.0120.02412.57
5.4.160.0100.02112.55
5.4.150.0080.02512.46
5.4.140.0100.02112.36
5.4.130.0100.02212.35
5.4.120.0130.02112.34
5.4.110.0120.02212.31
5.4.100.0090.02112.39
5.4.90.0100.02412.35
5.4.80.0100.02012.35
5.4.70.0090.02112.37
5.4.60.0090.02212.46
5.4.50.0080.02412.37
5.4.40.0110.02512.29
5.4.30.0120.02412.42
5.4.20.0120.02512.46
5.4.10.0140.01812.32
5.4.00.0090.02412.14
5.3.290.0100.02312.86
5.3.280.0110.02612.69
5.3.270.0080.02512.72
5.3.260.0120.02812.72
5.3.250.0080.02512.81
5.3.240.0100.02312.72
5.3.230.0110.02912.68
5.3.220.0110.02612.68
5.3.210.0100.02912.67
5.3.200.0110.02112.69
5.3.190.0140.02212.71
5.3.180.0120.02212.90
5.3.170.0120.02212.76
5.3.160.0130.01912.88
5.3.150.0110.02412.78
5.3.140.0110.02212.72
5.3.130.0100.02512.73
5.3.120.0140.02712.71
5.3.110.0130.02512.72
5.3.100.0110.02212.47
5.3.90.0140.02212.50
5.3.80.0100.02312.49
5.3.70.0140.02012.41
5.3.60.0130.02112.42
5.3.50.0080.02512.43
5.3.40.0130.02612.37
5.3.30.0070.02612.43
5.3.20.0060.02612.30
5.3.10.0090.02412.11
5.3.00.0090.02412.24
5.2.170.0050.02210.56
5.2.160.0100.01610.59
5.2.150.0070.02010.58
5.2.140.0090.01910.56
5.2.130.0090.01910.60
5.2.120.0080.01810.54
5.2.110.0170.01510.54
5.2.100.0080.02510.55
5.2.90.0050.02110.54
5.2.80.0080.02010.54
5.2.70.0100.01810.54
5.2.60.0070.02110.52
5.2.50.0060.02210.50
5.2.40.0110.01810.52
5.2.30.0110.01710.48
5.2.20.0080.02110.47
5.2.10.0090.01610.42
5.2.00.0090.01810.36
5.1.60.0100.01410.00
5.1.50.0070.01710.00
5.1.40.0070.0229.98
5.1.30.0100.01910.16
5.1.20.0070.01710.17
5.1.10.0060.01810.04
5.1.00.0060.01810.04
5.0.50.0060.0129.28
5.0.40.0090.0109.20
5.0.30.0040.0219.11
5.0.20.0070.0159.09
5.0.10.0050.0169.08
5.0.00.0080.0159.08
4.4.90.0050.0128.34
4.4.80.0040.0098.33
4.4.70.0080.0078.33
4.4.60.0080.0108.33
4.4.50.0050.0088.34
4.4.40.0060.0148.30
4.4.30.0020.0148.33
4.4.20.0060.0078.37
4.4.10.0060.0108.37
4.4.00.0050.0138.33
4.3.110.0040.0098.29
4.3.100.0040.0108.28
4.3.90.0010.0128.27
4.3.80.0050.0168.24
4.3.70.0040.0098.27
4.3.60.0040.0108.26
4.3.50.0010.0138.27
4.3.40.0050.0148.22
4.3.30.0040.0107.61
4.3.20.0050.0087.60
4.3.10.0030.0107.57
4.3.00.0100.01213.77

preferences:
53.86 ms | 400 KiB | 5 Q