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.0150.00016.49
8.3.50.0120.01222.75
8.3.40.0060.01018.93
8.3.30.0040.01119.04
8.3.20.0070.00020.35
8.3.10.0040.00423.64
8.3.00.0040.00419.63
8.2.180.0100.01017.00
8.2.170.0070.01122.96
8.2.160.0090.00420.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00021.02
8.2.110.0090.00020.49
8.2.100.0090.00318.16
8.2.90.0080.00319.09
8.2.80.0090.00017.97
8.2.70.0080.00017.63
8.2.60.0050.00318.04
8.2.50.0000.00918.07
8.2.40.0000.00818.02
8.2.30.0040.00418.17
8.2.20.0000.00817.80
8.2.10.0050.00318.27
8.2.00.0030.00618.04
8.1.280.0140.00425.92
8.1.270.0030.00723.91
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00722.14
8.1.230.0070.00418.97
8.1.220.0060.00317.77
8.1.210.0050.00318.77
8.1.200.0030.00617.38
8.1.190.0080.00017.22
8.1.180.0040.00418.10
8.1.170.0000.00918.72
8.1.160.0070.00021.96
8.1.150.0030.00518.91
8.1.140.0050.00217.61
8.1.130.0040.00417.87
8.1.120.0030.00317.50
8.1.110.0040.00417.61
8.1.100.0030.00517.61
8.1.90.0030.00317.47
8.1.80.0040.00417.62
8.1.70.0070.00017.44
8.1.60.0060.00317.73
8.1.50.0070.00317.46
8.1.40.0040.00417.66
8.1.30.0000.00917.59
8.1.20.0040.00417.65
8.1.10.0040.00417.61
8.1.00.0050.00317.52
8.0.300.0050.00318.77
8.0.290.0000.00716.75
8.0.280.0020.00518.40
8.0.270.0000.00717.29
8.0.260.0060.00017.18
8.0.250.0030.00317.09
8.0.240.0030.00317.02
8.0.230.0000.00817.02
8.0.220.0000.00717.01
8.0.210.0000.00817.04
8.0.200.0040.00416.93
8.0.190.0000.00717.03
8.0.180.0000.00717.02
8.0.170.0040.00417.07
8.0.160.0040.00417.10
8.0.150.0040.00416.81
8.0.140.0040.00416.95
8.0.130.0000.00813.38
8.0.120.0000.00816.96
8.0.110.0040.00417.07
8.0.100.0040.00416.90
8.0.90.0040.00417.04
8.0.80.0090.00616.96
8.0.70.0080.00017.00
8.0.60.0000.00817.01
8.0.50.0040.00416.79
8.0.30.0100.00817.19
8.0.20.0130.00617.40
8.0.10.0040.00417.12
8.0.00.0070.01116.78
7.4.330.0050.00015.00
7.4.320.0060.00016.79
7.4.300.0040.00416.59
7.4.290.0000.00716.61
7.4.280.0000.00716.72
7.4.270.0050.00216.68
7.4.260.0050.00216.65
7.4.250.0070.00016.62
7.4.240.0040.00416.78
7.4.230.0070.00016.67
7.4.220.0080.01616.84
7.4.210.0150.00616.87
7.4.200.0040.00416.52
7.4.160.0060.01016.68
7.4.150.0100.01017.40
7.4.140.0080.00817.86
7.4.130.0080.01116.59
7.4.120.0060.01216.65
7.4.110.0120.00616.64
7.4.100.0160.00316.55
7.4.90.0070.01116.57
7.4.80.0040.01419.39
7.4.70.0140.00716.53
7.4.60.0150.01416.55
7.4.50.0160.00316.66
7.4.40.0130.01116.66
7.4.30.0320.00516.65
7.4.20.0270.00516.56
7.4.10.0170.01416.65
7.4.00.0050.01315.95
7.3.330.0050.00213.39
7.3.320.0070.00013.19
7.3.310.0070.00016.30
7.3.300.0080.00016.41
7.3.290.0060.00916.38
7.3.280.0070.00816.37
7.3.270.0170.00717.40
7.3.260.0070.01116.66
7.3.250.0080.00916.64
7.3.240.0080.01116.37
7.3.230.0060.01016.39
7.3.210.0100.00716.60
7.3.200.0130.00916.39
7.3.190.0200.00816.62
7.3.180.0150.00616.48
7.3.170.0190.00616.57
7.3.160.0160.00716.69
7.3.150.0260.00816.51
7.3.140.0130.01616.30
7.3.130.0140.01416.58
7.3.120.0160.02016.34
7.3.110.0200.00716.20
7.3.100.0240.00716.67
7.3.90.0270.00516.38
7.3.80.0270.00316.75
7.3.70.0150.01516.43
7.3.60.0210.00316.45
7.3.50.0160.00516.43
7.3.40.0070.01116.26
7.3.30.0030.01416.29
7.3.20.0060.01218.15
7.3.10.0110.00818.24
7.3.00.0120.00517.36
7.2.330.0180.00016.78
7.2.320.0110.00916.78
7.2.310.0130.01316.66
7.2.300.0190.00416.67
7.2.290.0190.00916.78
7.2.280.0230.00716.49
7.2.270.0220.01116.49
7.2.260.0220.00616.78
7.2.250.0200.01216.46
7.2.240.0170.01416.59
7.2.230.0150.01616.87
7.2.220.0210.01116.76
7.2.210.0250.00716.63
7.2.200.0140.01116.52
7.2.190.0160.00916.63
7.2.180.0100.01016.44
7.2.170.0130.01016.59
7.2.160.0110.01116.69
7.2.150.0120.00918.44
7.2.140.0180.00318.34
7.2.130.0090.01217.58
7.2.120.0130.00817.43
7.2.110.0080.00817.64
7.2.100.0120.00417.55
7.2.90.0110.01017.65
7.2.80.0140.00717.51
7.2.70.0080.01117.55
7.2.60.0070.01017.55
7.2.50.0100.01117.62
7.2.40.0120.01617.64
7.2.30.0050.00917.73
7.2.20.0080.00717.79
7.2.10.0110.00617.70
7.2.00.0040.01018.31
7.1.330.0120.01517.71
7.1.320.0210.00917.43
7.1.310.0230.00617.52
7.1.300.0190.01117.61
7.1.290.0290.00317.53
7.1.280.0180.00917.52
7.1.270.0220.00817.65
7.1.260.0220.00817.43
7.1.250.0140.01016.81
7.1.240.0130.01216.60
7.1.230.0100.01316.69
7.1.220.0140.00816.80
7.1.210.0080.01416.57
7.1.200.0110.00816.32
7.1.190.0140.01216.72
7.1.180.0120.00916.75
7.1.170.0220.00416.71
7.1.160.0170.00716.63
7.1.150.0120.00916.76
7.1.140.0150.00716.55
7.1.130.0180.00416.52
7.1.120.0130.00516.67
7.1.110.0160.00616.69
7.1.100.0080.00817.15
7.1.90.0160.00416.73
7.1.80.0140.00616.83
7.1.70.0120.00516.94
7.1.60.0100.01217.50
7.1.50.0120.01016.76
7.1.40.0100.01216.65
7.1.30.0100.01316.58
7.1.20.0150.00616.79
7.1.10.0130.00716.80
7.1.00.0100.02918.68
7.0.330.0160.00616.38
7.0.320.0110.00816.35
7.0.310.0160.00716.37
7.0.300.0160.00616.26
7.0.290.0050.01616.36
7.0.280.0110.01016.38
7.0.270.0110.00916.51
7.0.260.0090.00916.28
7.0.250.0150.00816.35
7.0.240.0130.00516.46
7.0.230.0140.00416.46
7.0.220.0180.00416.26
7.0.210.0110.01216.33
7.0.200.0120.00416.49
7.0.190.0160.00316.54
7.0.180.0090.00916.19
7.0.170.0160.00916.37
7.0.160.0120.00716.34
7.0.150.0150.00516.36
7.0.140.0140.02518.32
7.0.130.0090.00916.44
7.0.120.0110.01016.29
7.0.110.0110.01116.35
7.0.100.0180.00716.38
7.0.90.0080.01216.41
7.0.80.0110.00816.25
7.0.70.0150.00616.31
7.0.60.0120.02117.56
7.0.50.0090.02216.92
7.0.40.0090.03316.84
7.0.30.0190.03316.88
7.0.20.0160.02516.92
7.0.10.0100.03316.95
7.0.00.0110.02616.98
5.6.400.0180.01515.91
5.6.390.0190.01115.79
5.6.380.0150.00715.16
5.6.370.0120.00914.81
5.6.360.0170.00815.22
5.6.350.0090.01115.13
5.6.340.0070.01215.32
5.6.330.0140.01014.91
5.6.320.0150.00615.04
5.6.310.0170.00815.27
5.6.300.0120.01015.24
5.6.290.0170.00515.23
5.6.280.0080.03217.08
5.6.270.0130.01015.25
5.6.260.0110.00915.17
5.6.250.0160.00615.18
5.6.240.0120.00915.14
5.6.230.0190.00715.15
5.6.220.0120.01214.99
5.6.210.0160.02617.00
5.6.200.0070.03416.19
5.6.190.0090.02116.92
5.6.180.1480.01916.86
5.6.170.0140.02216.86
5.6.160.0140.03216.81
5.6.150.0080.03116.15
5.6.140.0130.03316.14
5.6.130.0080.02016.07
5.6.120.0100.01817.09
5.6.110.0130.03217.07
5.6.100.0090.03417.03
5.6.90.0100.03217.09
5.6.80.0110.02616.90
5.6.70.1580.02216.85
5.6.60.0080.01314.89
5.6.50.0110.00915.03
5.6.40.0060.01115.02
5.6.30.0130.00914.92
5.6.20.0150.00715.01
5.6.10.0110.00915.09
5.6.00.0150.00615.23
5.5.380.0170.00913.55
5.5.370.0120.00913.36
5.5.360.0100.00713.28
5.5.350.0110.02915.81
5.5.340.0110.03214.92
5.5.330.0100.03115.62
5.5.320.0230.01915.61
5.5.310.0180.02815.69
5.5.300.0100.01914.92
5.5.290.0090.02614.99
5.5.280.0080.02315.87
5.5.270.0100.03415.79
5.5.260.0090.03115.91
5.5.250.0110.02315.88
5.5.240.0110.02715.73
5.5.230.0120.01013.38
5.5.220.0130.00613.27
5.5.210.0100.00813.33
5.5.200.0150.00913.40
5.5.190.0110.00713.37
5.5.180.0190.00213.33
5.5.170.0120.00713.39
5.5.160.0070.01113.35
5.5.150.0090.01413.31
5.5.140.0110.01013.45
5.5.130.0130.00613.29
5.5.120.0130.00713.38
5.5.110.0100.00713.38
5.5.100.0090.01113.40
5.5.90.0110.01213.49
5.5.80.0120.00913.45
5.5.70.0120.00513.31
5.5.60.0140.00513.49
5.5.50.0210.00513.33
5.5.40.0110.00913.54
5.5.30.0160.00513.50
5.5.20.0110.00813.32
5.5.10.0160.00313.41
5.5.00.0090.01313.41
5.4.450.0100.01914.42
5.4.440.0140.01414.38
5.4.430.0160.01814.33
5.4.420.0190.01614.55
5.4.410.0110.02214.28
5.4.400.0160.02114.10
5.4.390.0150.01814.25
5.4.380.0220.02414.13
5.4.370.0160.02313.93
5.4.360.0180.02114.17
5.4.350.0190.02314.09
5.4.340.0160.02114.26
5.4.330.0060.01011.86
5.4.320.0070.01912.06
5.4.310.0100.01712.18
5.4.300.0060.01911.96
5.4.290.0080.01611.99
5.4.280.0080.01612.13
5.4.270.0080.02011.98
5.4.260.0100.01612.04
5.4.250.0080.02111.93
5.4.240.0100.01612.05
5.4.230.0120.01511.96
5.4.220.0080.01811.95
5.4.210.0070.02011.98
5.4.200.0080.02012.01
5.4.190.0110.01512.00
5.4.180.0110.01512.09
5.4.170.0100.01712.06
5.4.160.0060.01812.07
5.4.150.0070.01612.07
5.4.140.0100.01511.95
5.4.130.0080.01711.92
5.4.120.0100.01611.88
5.4.110.0090.01811.94
5.4.100.0060.01711.87
5.4.90.0050.01812.08
5.4.80.0060.01711.99
5.4.70.0080.01411.94
5.4.60.0050.01611.83
5.4.50.0070.01811.89
5.4.40.0090.01912.01
5.4.30.0080.01411.94
5.4.20.0110.01511.86
5.4.10.0040.02011.98
5.4.00.0050.01911.79
5.3.290.0070.01911.96
5.3.280.0080.01812.00
5.3.270.0100.01911.99
5.3.260.0070.01911.97
5.3.250.0080.02011.94
5.3.240.0110.01611.93
5.3.230.0100.01611.86
5.3.220.0090.01711.87
5.3.210.0080.02211.78
5.3.200.0020.01911.91
5.3.190.0050.01912.01
5.3.180.0070.01911.99
5.3.170.0090.01612.03
5.3.160.0060.01911.96
5.3.150.0080.01611.98
5.3.140.0050.01711.98
5.3.130.0050.02011.91
5.3.120.0050.01711.98
5.3.110.0060.01711.92
5.3.100.0080.01811.77
5.3.90.0090.01811.82
5.3.80.0060.02111.63
5.3.70.0070.02011.70
5.3.60.0070.01811.78
5.3.50.0080.02011.71
5.3.40.0100.01911.66
5.3.30.0100.01611.71
5.3.20.0070.01811.60
5.3.10.0120.01511.42
5.3.00.0110.01911.43
5.2.170.0050.01910.18
5.2.160.0070.01710.19
5.2.150.0090.01410.18
5.2.140.0070.01310.18
5.2.130.0070.01710.17
5.2.120.0080.01710.17
5.2.110.0080.01410.17
5.2.100.0050.01510.21
5.2.90.0080.01210.16
5.2.80.0080.01410.16
5.2.70.0050.01610.16
5.2.60.0070.01310.15
5.2.50.0060.01610.14
5.2.40.0060.01510.13
5.2.30.0080.01610.12
5.2.20.0050.01710.12
5.2.10.0070.01410.09
5.2.00.0060.01510.04
5.1.60.0050.0139.80
5.1.50.0060.0119.80
5.1.40.0070.0119.79
5.1.30.0080.0109.91
5.1.20.0070.0139.92
5.1.10.0070.0109.83
5.1.00.0060.0149.83
5.0.50.0060.0089.32
5.0.40.0050.0149.27
5.0.30.0060.0139.21
5.0.20.0040.0099.20
5.0.10.0040.0139.19
5.0.00.0040.0169.19
4.4.90.0040.0098.70
4.4.80.0060.0068.69
4.4.70.0030.0098.69
4.4.60.0040.0098.69
4.4.50.0040.0098.70
4.4.40.0030.0118.67
4.4.30.0030.0098.69
4.4.20.0050.0078.72
4.4.10.0040.0098.72
4.4.00.0030.0128.69
4.3.110.0040.0068.66
4.3.100.0020.0108.66
4.3.90.0030.0078.65
4.3.80.0030.0128.63
4.3.70.0040.0088.65
4.3.60.0040.0098.65
4.3.50.0030.0118.65
4.3.40.0040.0108.62
4.3.30.0020.0118.21
4.3.20.0030.0118.20
4.3.10.0020.0098.18
4.3.00.0030.00812.30

preferences:
45.6 ms | 401 KiB | 5 Q