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'); 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.0070.01016.63
8.3.50.0080.01422.88
8.3.40.0110.00418.82
8.3.30.0120.00318.96
8.3.20.0050.00320.29
8.3.10.0080.00023.71
8.3.00.0050.00319.51
8.2.180.0070.01316.88
8.2.170.0060.00922.96
8.2.160.0110.00420.45
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0040.00421.10
8.2.110.0060.00320.49
8.2.100.0040.00718.22
8.2.90.0040.00719.23
8.2.80.0000.00817.97
8.2.70.0000.00917.88
8.2.60.0080.00017.93
8.2.50.0080.00318.07
8.2.40.0040.00419.97
8.2.30.0000.00819.93
8.2.20.0030.00617.83
8.2.10.0050.00318.11
8.2.00.0040.00417.96
8.1.280.0070.00725.92
8.1.270.0060.00323.91
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00322.10
8.1.230.0060.00619.15
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0000.00917.47
8.1.190.0000.00817.35
8.1.180.0090.00018.10
8.1.170.0000.00818.79
8.1.160.0040.00421.97
8.1.150.0050.00318.89
8.1.140.0040.00417.51
8.1.130.0040.00417.90
8.1.120.0070.00017.55
8.1.110.0000.00817.43
8.1.100.0040.00417.50
8.1.90.0000.00717.61
8.1.80.0070.00017.45
8.1.70.0070.00017.50
8.1.60.0060.00317.69
8.1.50.0030.00617.62
8.1.40.0030.00617.56
8.1.30.0000.00817.63
8.1.20.0000.00717.75
8.1.10.0040.00417.70
8.1.00.0040.00417.62
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0030.00518.39
8.0.270.0040.00417.03
8.0.260.0000.00817.28
8.0.250.0000.00717.10
8.0.240.0070.00017.04
8.0.230.0000.00716.91
8.0.220.0030.00316.88
8.0.210.0070.00017.03
8.0.200.0030.00317.03
8.0.190.0080.00017.02
8.0.180.0030.00316.95
8.0.170.0000.00816.91
8.0.160.0050.00216.86
8.0.150.0040.00416.81
8.0.140.0000.01016.93
8.0.130.0040.00413.45
8.0.120.0000.00816.98
8.0.110.0040.00416.96
8.0.100.0000.00716.87
8.0.90.0000.00717.02
8.0.80.0060.00916.88
8.0.70.0080.00016.93
8.0.60.0030.00516.79
8.0.50.0040.00416.87
8.0.30.0160.00517.34
8.0.20.0090.01317.45
8.0.10.0040.00417.04
8.0.00.0100.00916.98
7.4.330.0060.00015.00
7.4.320.0030.00316.73
7.4.300.0000.00816.76
7.4.290.0030.00516.66
7.4.280.0000.00716.66
7.4.270.0000.00716.67
7.4.260.0040.00416.63
7.4.250.0000.00816.64
7.4.240.0050.00216.72
7.4.230.0070.00016.66
7.4.220.0070.01116.84
7.4.210.0080.01116.67
7.4.200.0000.00816.74
7.4.160.0000.01516.80
7.4.150.0150.00917.40
7.4.140.0030.01417.86
7.4.130.0050.01416.70
7.4.120.0060.01116.84
7.4.110.0000.01816.55
7.4.100.0100.01116.71
7.4.90.0070.01016.63
7.4.80.0070.01119.39
7.4.70.0180.00416.32
7.4.60.0130.00816.49
7.4.50.0120.00416.59
7.4.40.0150.00816.71
7.4.30.0190.00616.62
7.4.20.0080.01716.40
7.4.10.0140.01116.39
7.4.00.0090.01015.96
7.3.330.0050.00313.37
7.3.320.0000.00613.45
7.3.310.0000.00716.29
7.3.300.0000.00816.29
7.3.290.0090.01016.35
7.3.280.0110.00816.43
7.3.270.0080.00817.40
7.3.260.0180.00616.38
7.3.250.0090.00916.39
7.3.240.0090.00916.66
7.3.230.0120.00416.43
7.3.210.0000.01816.52
7.3.200.0070.01016.82
7.3.190.0160.00616.51
7.3.180.0160.00516.36
7.3.170.0130.00716.64
7.3.160.0180.00416.49
7.3.150.0240.00316.56
7.3.140.0170.00716.29
7.3.130.0160.01316.54
7.3.120.0180.00716.51
7.3.110.0140.01116.25
7.3.100.0040.01916.30
7.3.90.0150.01516.40
7.3.80.0140.01016.29
7.3.70.0120.01216.47
7.3.60.0110.01516.28
7.3.50.0160.00816.28
7.3.40.0180.00416.21
7.3.30.0120.01216.48
7.3.20.0540.00316.35
7.3.10.0170.01116.29
7.3.00.0090.01516.29
7.2.330.0170.00016.70
7.2.320.0120.00616.83
7.2.310.0170.00516.62
7.2.300.0130.00816.74
7.2.290.0140.00816.54
7.2.280.0170.01016.53
7.2.270.0120.01216.48
7.2.260.0160.01316.61
7.2.250.0150.00716.77
7.2.240.0100.01716.42
7.2.230.0070.01716.52
7.2.220.0180.01216.41
7.2.210.0100.01716.45
7.2.200.0260.01116.73
7.2.190.0160.01316.55
7.2.180.0130.00916.43
7.2.170.0160.00716.45
7.2.160.0200.00316.44
7.2.150.0150.01216.68
7.2.140.0210.00816.66
7.2.130.0130.01316.62
7.2.120.0070.01416.63
7.2.110.0110.01116.60
7.2.100.0230.00316.50
7.2.90.0180.00416.73
7.2.80.0190.00416.67
7.2.70.0070.01516.55
7.2.60.0220.00816.79
7.2.50.0120.01016.81
7.2.40.0130.01316.63
7.2.30.0170.00616.51
7.2.20.0150.00616.54
7.2.10.0140.00716.52
7.2.00.0080.01118.05
7.1.330.0200.01015.74
7.1.320.0190.01115.91
7.1.310.0230.00715.78
7.1.300.0210.01315.68
7.1.290.0260.00615.64
7.1.280.0230.00715.61
7.1.270.0150.01115.40
7.1.260.0150.01215.46
7.1.250.0220.00715.78
7.1.240.0220.00715.57
7.1.230.0230.00315.31
7.1.220.0160.01315.32
7.1.210.0060.01615.57
7.1.200.0090.01215.81
7.1.190.0260.01815.37
7.1.180.0200.00915.65
7.1.170.0230.00315.60
7.1.160.0180.01415.63
7.1.150.0100.01615.37
7.1.140.0180.00315.63
7.1.130.0140.01115.43
7.1.120.0200.00315.74
7.1.110.0190.00515.57
7.1.100.0140.00716.98
7.1.90.0210.00415.43
7.1.80.0230.00015.60
7.1.70.0150.00616.38
7.1.60.0140.01017.44
7.1.50.0110.01116.32
7.1.40.0140.00715.49
7.1.30.0130.01315.54
7.1.20.0610.00915.34
7.1.10.0130.01315.72
7.1.00.0120.04219.02
7.0.330.0160.01215.41
7.0.320.0200.00315.14
7.0.310.0110.01515.06
7.0.300.0170.01015.64
7.0.290.0220.00415.53
7.0.280.0220.00015.22
7.0.270.0150.00515.04
7.0.260.0140.00815.18
7.0.250.0180.00815.39
7.0.240.0200.00415.09
7.0.230.0150.00815.25
7.0.220.0130.00915.14
7.0.210.0200.00615.21
7.0.200.0070.00715.98
7.0.190.0200.00715.46
7.0.180.0130.01014.90
7.0.170.0200.01114.98
7.0.160.0120.01515.59
7.0.150.0170.00915.28
7.0.140.0140.03718.64
7.0.130.0310.00415.44
7.0.120.0180.00815.51
7.0.110.0090.01415.05
7.0.100.0190.00815.46
7.0.90.0180.00915.32
7.0.80.0210.00615.39
7.0.70.0190.00415.17
7.0.60.0140.04317.65
7.0.50.0070.04316.60
7.0.40.0140.02217.80
7.0.30.0320.03717.51
7.0.20.0200.02817.60
7.0.10.0150.03017.73
7.0.00.0130.04617.57
5.6.400.0170.00715.94
5.6.390.0180.00915.75
5.6.380.0190.00715.63
5.6.370.0250.00315.69
5.6.360.0200.00715.79
5.6.350.0100.01615.58
5.6.340.0160.00715.46
5.6.330.0170.01015.59
5.6.320.0140.00915.45
5.6.310.0140.00915.48
5.6.300.0190.00915.94
5.6.290.0120.01616.10
5.6.280.0090.04418.71
5.6.270.0200.00716.27
5.6.260.0190.00815.81
5.6.250.0160.01216.25
5.6.240.0210.00815.88
5.6.230.0210.00716.05
5.6.220.0150.00915.59
5.6.210.0110.04518.03
5.6.200.0160.04216.87
5.6.190.0110.02718.08
5.6.180.0250.02818.08
5.6.170.0170.02817.99
5.6.160.0120.04617.95
5.6.150.0110.04616.90
5.6.140.0100.02516.90
5.6.130.0090.04716.87
5.6.120.0200.05118.11
5.6.110.0160.04118.35
5.6.100.0140.04718.33
5.6.90.0060.04918.17
5.6.80.0070.04717.89
5.6.70.0110.01115.66
5.6.60.0140.00715.43
5.6.50.0130.01315.44
5.6.40.0220.00315.54
5.6.30.0110.01115.61
5.6.20.0070.01715.60
5.6.10.0150.00815.39
5.6.00.0210.00615.35
5.5.380.0180.01215.70
5.5.370.0140.01415.86
5.5.360.0100.01415.45
5.5.350.0190.02718.03
5.5.340.0100.04816.88
5.5.330.0090.02518.02
5.5.320.0250.03617.88
5.5.310.0170.03717.84
5.5.300.0170.03416.84
5.5.290.0150.03316.62
5.5.280.0160.03918.21
5.5.270.0140.03818.03
5.5.260.0130.04818.23
5.5.250.0130.04718.04
5.5.240.0160.03917.94
5.5.230.0170.01115.40
5.5.220.0200.00615.65
5.5.210.0170.01015.29
5.5.200.0220.01315.55
5.5.190.0140.00815.42
5.5.180.0030.02415.68
5.5.170.0040.01915.36
5.5.160.0180.00515.61
5.5.150.0230.00815.65
5.5.140.0220.00815.45
5.5.130.0250.00615.43
5.5.120.0110.01215.39
5.5.110.0170.00715.47
5.5.100.0200.00715.79
5.5.90.0140.01415.83
5.5.80.0090.01915.61
5.5.70.0080.01415.49
5.5.60.0080.01515.35
5.5.50.0080.01615.36
5.5.40.0170.00715.49
5.5.30.0110.01215.42
5.5.20.0130.01015.52
5.5.10.0150.00915.50
5.5.00.0110.01115.27
5.4.450.0210.02815.98
5.4.440.0210.02115.88
5.4.430.0270.02615.95
5.4.420.0150.02115.94
5.4.410.0110.03015.90
5.4.400.0050.02915.72
5.4.390.0210.01815.80
5.4.380.0630.03215.54
5.4.370.0630.02515.34
5.4.360.0640.02915.62
5.4.350.0520.03515.53
5.4.340.0610.02815.63
5.4.330.0070.01012.57
5.4.320.0090.02312.57
5.4.310.0050.02612.59
5.4.300.0070.02412.41
5.4.290.0060.02612.42
5.4.280.0100.01912.33
5.4.270.0040.02412.40
5.4.260.0080.02412.45
5.4.250.0120.02112.55
5.4.240.0110.01912.34
5.4.230.0040.03012.44
5.4.220.0070.02312.51
5.4.210.0060.02212.37
5.4.200.0100.02312.33
5.4.190.0050.02512.53
5.4.180.0080.02112.37
5.4.170.0090.02112.42
5.4.160.0080.02212.43
5.4.150.0120.01912.38
5.4.140.0090.02212.23
5.4.130.0120.01912.21
5.4.120.0110.01812.23
5.4.110.0110.02112.19
5.4.100.0080.02112.24
5.4.90.0090.02012.28
5.4.80.0110.02112.29
5.4.70.0120.02312.22
5.4.60.0150.01812.23
5.4.50.0090.02212.22
5.4.40.0060.02412.28
5.4.30.0080.02912.26
5.4.20.0110.02712.31
5.4.10.0100.02712.23
5.4.00.0100.02411.87
5.3.290.0100.02512.98
5.3.280.0080.02412.52
5.3.270.0130.02312.64
5.3.260.0090.02812.89
5.3.250.0110.02412.88
5.3.240.0120.02712.88
5.3.230.0080.02812.88
5.3.220.0080.02912.76
5.3.210.0100.02812.85
5.3.200.0130.02112.83
5.3.190.0060.02912.87
5.3.180.0090.02112.85
5.3.170.0070.02612.94
5.3.160.0040.03012.92
5.3.150.0100.03012.83
5.3.140.0100.02712.86
5.3.130.0110.02512.83
5.3.120.0090.02412.70
5.3.110.0110.02212.88
5.3.100.0090.02512.62
5.3.90.0080.02312.52
5.3.80.0070.02912.49
5.3.70.0120.03012.24
5.3.60.0120.02812.53
5.3.50.0120.02712.46
5.3.40.0120.02412.45
5.3.30.0080.02712.51
5.3.20.0080.02712.43
5.3.10.0110.02512.24
5.3.00.0110.02512.31
5.2.170.0050.02210.60
5.2.160.0090.01810.67
5.2.150.0080.02010.63
5.2.140.0090.02010.58
5.2.130.0130.01510.55
5.2.120.0100.01910.60
5.2.110.0070.02210.58
5.2.100.0080.01910.59
5.2.90.0120.01610.62
5.2.80.0070.01910.54
5.2.70.0090.01710.54
5.2.60.0070.02010.52
5.2.50.0090.02310.55
5.2.40.0080.02310.50
5.2.30.0090.02210.49
5.2.20.0090.01910.50
5.2.10.0070.02110.42
5.2.00.0080.02010.36
5.1.60.0100.01410.00
5.1.50.0070.01810.00
5.1.40.0060.0189.99
5.1.30.0040.01810.16
5.1.20.0050.01810.18
5.1.10.0050.01910.04
5.1.00.0010.02010.04
5.0.50.0050.0159.28
5.0.40.0040.0139.21
5.0.30.0040.0209.11
5.0.20.0070.0099.10
5.0.10.0040.0139.09
5.0.00.0060.0189.08
4.4.90.0050.0098.34
4.4.80.0080.0088.33
4.4.70.0080.0078.33
4.4.60.0050.0108.33
4.4.50.0060.0148.34
4.4.40.0050.0188.30
4.4.30.0040.0098.33
4.4.20.0050.0128.37
4.4.10.0020.0138.38
4.4.00.0040.0158.33
4.3.110.0050.0108.29
4.3.100.0050.0118.28
4.3.90.0070.0098.27
4.3.80.0040.0148.24
4.3.70.0030.0108.27
4.3.60.0060.0098.26
4.3.50.0030.0138.27
4.3.40.0050.0158.22
4.3.30.0030.0107.61
4.3.20.0020.0117.60
4.3.10.0040.0077.56
4.3.00.0020.01113.77

preferences:
59.74 ms | 401 KiB | 5 Q