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.0040.01116.72
8.3.50.0190.00322.96
8.3.40.0080.00819.09
8.3.30.0070.00718.93
8.3.20.0070.00020.34
8.3.10.0080.00023.66
8.3.00.0040.00419.51
8.2.180.0100.01017.00
8.2.170.0040.01522.96
8.2.160.0100.00320.39
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00421.02
8.2.110.0060.00320.38
8.2.100.0110.00018.22
8.2.90.0030.00519.23
8.2.80.0080.00017.97
8.2.70.0040.00417.88
8.2.60.0040.00417.93
8.2.50.0030.00718.07
8.2.40.0040.00419.89
8.2.30.0000.00819.77
8.2.20.0050.00317.91
8.2.10.0000.00718.16
8.2.00.0030.00517.98
8.1.280.0120.00325.92
8.1.270.0070.00423.96
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00022.08
8.1.230.0130.00019.01
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0000.00817.47
8.1.180.0080.00018.10
8.1.170.0050.00318.62
8.1.160.0000.00822.00
8.1.150.0000.00718.91
8.1.140.0080.00017.49
8.1.130.0030.00317.83
8.1.120.0040.00417.64
8.1.110.0080.00017.47
8.1.100.0050.00217.46
8.1.90.0050.00217.61
8.1.80.0040.00417.61
8.1.70.0030.00317.53
8.1.60.0040.00417.59
8.1.50.0090.00017.62
8.1.40.0090.00017.50
8.1.30.0000.00917.77
8.1.20.0020.00517.75
8.1.10.0000.00817.68
8.1.00.0000.00817.51
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.54
8.0.270.0000.00817.21
8.0.260.0060.00017.30
8.0.250.0070.00017.15
8.0.240.0030.00317.02
8.0.230.0040.00316.94
8.0.220.0070.00016.98
8.0.210.0000.00716.99
8.0.200.0040.00417.08
8.0.190.0050.00317.11
8.0.180.0070.00017.03
8.0.170.0040.00417.04
8.0.160.0040.00416.94
8.0.150.0030.00516.88
8.0.140.0020.00816.87
8.0.130.0090.00013.36
8.0.120.0040.00417.03
8.0.110.0000.00716.94
8.0.100.0040.00416.82
8.0.90.0080.00016.89
8.0.80.0100.00616.98
8.0.70.0000.00716.88
8.0.60.0040.00416.97
8.0.50.0040.00416.98
8.0.30.0080.01117.18
8.0.20.0150.00817.40
8.0.10.0000.00817.22
8.0.00.0090.00916.90
7.4.330.0050.00015.00
7.4.320.0030.00316.82
7.4.300.0070.00016.53
7.4.290.0000.00716.70
7.4.280.0060.00316.69
7.4.270.0000.00816.68
7.4.260.0040.00416.65
7.4.250.0030.00616.59
7.4.240.0020.00616.74
7.4.230.0030.00316.80
7.4.220.0090.00916.73
7.4.210.0100.00616.70
7.4.200.0050.00316.65
7.4.160.0060.01016.46
7.4.150.0060.01417.40
7.4.140.0050.01517.86
7.4.130.0140.00616.64
7.4.120.0090.01016.78
7.4.110.0130.01016.62
7.4.100.0130.00316.66
7.4.90.0090.00916.56
7.4.80.0150.00419.39
7.4.70.0100.01116.43
7.4.60.0130.01116.64
7.4.50.0140.00616.63
7.4.40.0080.01516.52
7.4.30.0140.01416.57
7.4.20.0300.00016.82
7.4.10.0200.00916.48
7.4.00.0080.01015.80
7.3.330.0080.00013.40
7.3.320.0000.00513.33
7.3.310.0040.00416.45
7.3.300.0000.00716.44
7.3.290.0060.01316.40
7.3.280.0100.01016.38
7.3.270.0100.00717.40
7.3.260.0120.00616.44
7.3.250.0120.00716.40
7.3.240.0090.00916.82
7.3.230.0060.01616.47
7.3.210.0030.01316.43
7.3.200.0070.01016.64
7.3.190.0210.00516.33
7.3.180.0160.00716.69
7.3.170.0100.01016.39
7.3.160.0180.00816.57
7.3.150.0260.00916.27
7.3.140.0230.00716.37
7.3.130.0160.01216.64
7.3.120.0200.00916.30
7.3.110.0200.00616.39
7.3.100.0270.00916.20
7.3.90.0180.01116.66
7.3.80.0270.00416.54
7.3.70.0190.01016.30
7.3.60.0230.00816.34
7.3.50.0300.00716.64
7.3.40.0220.00416.22
7.3.30.0190.00916.36
7.3.20.0180.00816.46
7.3.10.0100.01016.44
7.3.00.0090.00916.45
7.2.330.0070.01116.81
7.2.320.0100.01016.91
7.2.310.0190.00716.73
7.2.300.0120.01516.74
7.2.290.0150.00916.67
7.2.280.0160.01016.71
7.2.270.0150.01816.72
7.2.260.0160.01416.71
7.2.250.0170.01116.53
7.2.240.0180.01416.78
7.2.230.0230.01016.72
7.2.220.0270.00716.69
7.2.210.0190.01116.65
7.2.200.0250.00616.74
7.2.190.0260.00716.84
7.2.180.0220.01316.54
7.2.170.0230.00716.66
7.2.160.0170.01416.46
7.2.150.0210.01016.52
7.2.140.0140.01116.79
7.2.130.0140.00916.76
7.2.120.0170.01316.67
7.2.110.0110.00816.83
7.2.100.0100.01016.81
7.2.90.0090.01116.75
7.2.80.0100.01016.83
7.2.70.0180.00616.79
7.2.60.0140.00616.68
7.2.50.0100.01016.64
7.2.40.0090.01016.78
7.2.30.0110.00916.65
7.2.20.0120.00617.52
7.2.10.0120.00817.30
7.2.00.0080.00717.84
7.1.330.0290.00415.74
7.1.320.0070.02515.95
7.1.310.0200.01215.86
7.1.300.0330.00415.68
7.1.290.0270.01115.80
7.1.280.0180.01515.67
7.1.270.0410.01615.76
7.1.260.0250.00415.73
7.1.250.0120.00615.85
7.1.240.0180.00615.68
7.1.230.0180.00315.69
7.1.220.0150.00915.80
7.1.210.0220.00315.78
7.1.200.0110.01115.70
7.1.190.0120.01115.78
7.1.180.0150.00815.86
7.1.170.0210.00415.64
7.1.160.0150.01015.76
7.1.150.0270.00516.69
7.1.140.0180.00716.64
7.1.130.0150.01016.86
7.1.120.0160.00716.71
7.1.110.0130.01016.79
7.1.100.0130.00817.30
7.1.90.0170.00616.60
7.1.80.0170.01016.60
7.1.70.0090.01116.89
7.1.60.0120.00516.91
7.1.50.0080.01116.81
7.1.40.0160.00516.73
7.1.30.0160.01016.57
7.1.20.0180.00916.68
7.1.10.0170.00616.55
7.1.00.0140.03118.70
7.0.330.0170.00615.41
7.0.320.0090.01215.37
7.0.310.0130.01115.32
7.0.300.0160.00715.57
7.0.290.0170.00415.31
7.0.280.0110.00916.42
7.0.270.0160.00616.26
7.0.260.0170.01016.38
7.0.250.0220.00416.31
7.0.240.0210.00816.42
7.0.230.0110.01516.53
7.0.220.0230.00616.34
7.0.210.0180.00816.25
7.0.200.0130.00816.54
7.0.190.0130.00816.29
7.0.180.0160.00816.43
7.0.170.0280.00416.40
7.0.160.0190.01016.36
7.0.150.0210.00516.24
7.0.140.0680.03118.17
7.0.130.0180.00716.36
7.0.120.0160.00816.33
7.0.110.0230.03217.54
7.0.100.0480.03517.59
7.0.90.0300.02417.57
7.0.80.0250.02217.36
7.0.70.0240.03417.59
7.0.60.0230.03717.52
7.0.50.0290.02517.70
7.0.40.0100.02517.00
7.0.30.0140.03516.94
7.0.20.0080.03716.85
7.0.10.0070.02717.01
7.0.00.0090.03616.97
5.6.400.0110.01816.10
5.6.390.0250.00616.03
5.6.380.0140.01315.15
5.6.370.0100.00915.42
5.6.360.0160.00715.25
5.6.350.0100.01015.09
5.6.340.0130.00915.38
5.6.330.0080.01215.29
5.6.320.0140.01015.22
5.6.310.0190.00115.23
5.6.300.0130.00815.45
5.6.290.0150.01114.88
5.6.280.0120.01115.21
5.6.270.0140.01315.10
5.6.260.0140.03216.93
5.6.250.0160.02817.02
5.6.240.0110.03417.05
5.6.230.0100.03217.06
5.6.220.0150.02816.93
5.6.210.0110.02216.82
5.6.200.0140.01817.14
5.6.190.0090.04017.17
5.6.180.0170.02817.06
5.6.170.0120.03317.08
5.6.160.0110.02917.10
5.6.150.0120.03416.96
5.6.140.0120.03517.06
5.6.130.0150.03117.06
5.6.120.0120.02916.97
5.6.110.0140.03117.10
5.6.100.0160.02917.14
5.6.90.0130.03117.07
5.6.80.0160.03216.92
5.6.70.0130.02116.96
5.6.60.0140.03016.73
5.6.50.0140.01916.66
5.6.40.0100.02116.84
5.6.30.0100.03116.84
5.6.20.0110.02216.79
5.6.10.0080.03316.74
5.6.00.0120.03116.65
5.5.380.0120.02215.87
5.5.370.0020.03615.72
5.5.360.0120.02115.69
5.5.350.0130.03315.92
5.5.340.0110.03016.00
5.5.330.0120.03515.94
5.5.320.0140.03215.92
5.5.310.0090.03515.85
5.5.300.0120.04015.83
5.5.290.0100.03316.00
5.5.280.0140.02815.90
5.5.270.0130.03315.88
5.5.260.0080.03616.10
5.5.250.0130.02915.92
5.5.240.0110.03015.76
5.5.230.0130.02915.71
5.5.220.0120.03115.65
5.5.210.0120.01615.67
5.5.200.0090.02815.81
5.5.190.0080.02615.65
5.5.180.0100.02815.65
5.5.170.0140.00613.38
5.5.160.0130.02515.76
5.5.150.0110.01615.58
5.5.140.0110.02415.66
5.5.130.0080.03615.64
5.5.120.0130.02715.66
5.5.110.0060.03715.71
5.5.100.0080.03315.63
5.5.90.0090.03515.66
5.5.80.0120.02315.61
5.5.70.0120.02315.66
5.5.60.0090.02915.70
5.5.50.0090.02115.58
5.5.40.0140.02515.69
5.5.30.0080.02915.59
5.5.20.0120.03115.71
5.5.10.0110.02915.76
5.5.00.0090.02915.56
5.4.450.0120.03114.38
5.4.440.0090.03214.46
5.4.430.0110.02714.40
5.4.420.0110.02814.40
5.4.410.0100.03114.29
5.4.400.0100.03114.20
5.4.390.0120.02814.29
5.4.380.0150.02414.24
5.4.370.0070.02714.19
5.4.360.0100.01814.36
5.4.350.0090.03014.20
5.4.340.0120.02814.27
5.4.330.0090.00811.76
5.4.320.0050.02314.32
5.4.310.0100.01614.25
5.4.300.0120.01414.24
5.4.290.0090.03014.30
5.4.280.0070.02814.18
5.4.270.0100.02814.24
5.4.260.0090.02314.22
5.4.250.0070.03014.26
5.4.240.0100.02014.21
5.4.230.0050.03014.24
5.4.220.0060.02814.32
5.4.210.0080.03214.25
5.4.200.0140.02414.24
5.4.190.0060.02514.32
5.4.180.0100.02714.25
5.4.170.0110.02714.31
5.4.160.0080.03114.39
5.4.150.0090.02914.26
5.4.140.0090.03113.41
5.4.130.0050.03513.34
5.4.120.0090.02913.31
5.4.110.0090.01913.40
5.4.100.0070.03213.33
5.4.90.0090.02813.40
5.4.80.0090.02813.42
5.4.70.0120.02613.42
5.4.60.0110.02913.42
5.4.50.0080.02513.37
5.4.40.0080.02613.29
5.4.30.0050.03013.30
5.4.20.0090.02113.37
5.4.10.0090.03113.35
5.4.00.0100.02613.21
5.3.290.0070.03212.78
5.3.280.0110.02812.73
5.3.270.0090.02912.73
5.3.260.0100.02112.74
5.3.250.0100.02512.74
5.3.240.0080.03012.75
5.3.230.0080.03012.72
5.3.220.0100.03012.80
5.3.210.0080.03112.70
5.3.200.0090.02912.67
5.3.190.0110.02912.73
5.3.180.0100.03012.91
5.3.170.0120.01912.77
5.3.160.0090.02912.82
5.3.150.0090.03112.94
5.3.140.0090.02912.78
5.3.130.0110.02912.78
5.3.120.0100.03112.81
5.3.110.0130.02412.75
5.3.100.0090.02912.66
5.3.90.0110.02612.62
5.3.80.0080.02912.55
5.3.70.0070.03012.62
5.3.60.0100.01812.65
5.3.50.0090.02912.57
5.3.40.0100.03012.54
5.3.30.0100.02412.62
5.3.20.0080.02112.45
5.3.10.0050.02812.40
5.3.00.0090.02712.36
5.2.170.0100.01511.52
5.2.160.0060.02711.51
5.2.150.0080.01311.51
5.2.140.0090.02411.51
5.2.130.0080.02511.51
5.2.120.0060.02011.52
5.2.110.0070.02411.51
5.2.100.0130.02011.51
5.2.90.0090.02211.51
5.2.80.0070.02511.51
5.2.70.0060.02611.51
5.2.60.0050.02811.51
5.2.50.0070.02311.54
5.2.40.0100.01711.51
5.2.30.0090.02211.51
5.2.20.0040.02511.51
5.2.10.0050.02111.51
5.2.00.0090.02311.51
5.1.60.0060.02311.51
5.1.50.0110.01711.51
5.1.40.0070.02111.51
5.1.30.0040.02311.51
5.1.20.0070.02011.51
5.1.10.0040.02511.51
5.1.00.0080.02111.51
5.0.50.0060.01911.51
5.0.40.0070.01511.51
5.0.30.0050.02411.51
5.0.20.0100.01411.51
5.0.10.0080.01611.51
5.0.00.0010.02811.51
4.4.90.0070.01211.51
4.4.80.0050.01311.51
4.4.70.0030.01511.51
4.4.60.0040.01411.51
4.4.50.0040.01411.51
4.4.40.0020.01811.51
4.4.30.0040.00811.51
4.4.20.0020.01711.51
4.4.10.0040.01411.51
4.4.00.0040.02111.51
4.3.110.0040.01311.51
4.3.100.0040.01311.51
4.3.90.0060.01211.51
4.3.80.0050.01411.51
4.3.70.0040.01411.51
4.3.60.0060.01211.51
4.3.50.0040.01411.51
4.3.40.0040.01811.51
4.3.30.0010.01211.51
4.3.20.0010.01511.51
4.3.10.0020.01411.51
4.3.00.0020.01411.51

preferences:
40.91 ms | 401 KiB | 5 Q