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\"?\u003eText~~~\u003c?dpf /sent ?\u003e"; $response = str_replace("\u003c", "<", $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.70.0070.00718.02
8.3.60.0100.00716.75
8.3.50.0140.01022.83
8.3.40.0050.01018.61
8.3.30.0090.00918.78
8.3.20.0000.00720.34
8.3.10.0050.00323.52
8.3.00.0000.00819.26
8.2.180.0060.01216.63
8.2.170.0070.00722.96
8.2.160.0130.00020.13
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0030.00521.04
8.2.110.0060.00320.20
8.2.100.0120.00018.03
8.2.90.0070.00319.09
8.2.80.0030.00517.97
8.2.70.0040.00417.50
8.2.60.0040.00417.92
8.2.50.0060.00318.07
8.2.40.0040.00419.81
8.2.30.0040.00418.17
8.2.20.0040.00417.70
8.2.10.0000.00718.14
8.2.00.0040.00417.64
8.1.280.0090.00925.92
8.1.270.0040.00423.83
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0040.00719.04
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.22
8.1.190.0060.00317.00
8.1.180.0080.00018.10
8.1.170.0050.00318.58
8.1.160.0000.00721.97
8.1.150.0000.00818.89
8.1.140.0020.00517.41
8.1.130.0080.00017.83
8.1.120.0040.00417.43
8.1.110.0000.00717.42
8.1.100.0000.00717.29
8.1.90.0030.00317.33
8.1.80.0000.00817.32
8.1.70.0070.00017.36
8.1.60.0050.00317.54
8.1.50.0040.00417.50
8.1.40.0020.00517.49
8.1.30.0040.00417.48
8.1.20.0040.00417.60
8.1.10.0000.00717.54
8.1.00.0050.00317.43
8.0.300.0020.00518.77
8.0.290.0040.00416.75
8.0.280.0070.00018.36
8.0.270.0070.00017.17
8.0.260.0030.00317.27
8.0.250.0000.00716.86
8.0.240.0070.00016.95
8.0.230.0040.00416.83
8.0.220.0000.00716.85
8.0.210.0000.00716.77
8.0.200.0030.00316.95
8.0.190.0070.00016.88
8.0.180.0040.00416.75
8.0.170.0040.00416.91
8.0.160.0070.00016.87
8.0.150.0000.00816.68
8.0.140.0030.00716.78
8.0.130.0060.00013.26
8.0.120.0040.00416.76
8.0.110.0040.00416.74
8.0.100.0040.00416.74
8.0.90.0040.00416.75
8.0.80.0080.00816.71
8.0.70.0070.00016.87
8.0.60.0080.00016.75
8.0.50.0000.00716.65
8.0.30.0090.01116.73
8.0.20.0120.01117.40
8.0.10.0080.00016.83
8.0.00.0100.00716.88
7.4.330.0060.00015.08
7.4.320.0030.00316.43
7.4.300.0070.00016.57
7.4.290.0030.00316.54
7.4.280.0070.00016.56
7.4.270.0040.00416.56
7.4.260.0050.00316.52
7.4.250.0040.00416.39
7.4.240.0000.00716.56
7.4.230.0040.00416.52
7.4.220.0140.00416.41
7.4.210.0040.01116.63
7.4.200.0080.00016.45
7.4.160.0090.00916.36
7.4.150.0100.00717.40
7.4.140.0090.00817.86
7.4.130.0070.00916.37
7.4.120.0080.00916.34
7.4.110.0140.00316.45
7.4.100.0090.00916.35
7.4.90.0110.01116.42
7.4.80.0150.00319.39
7.4.70.0140.00516.37
7.4.60.0100.01016.21
7.4.50.0060.01016.33
7.4.40.0130.00916.25
7.4.30.0150.00816.47
7.4.20.0080.01116.38
7.4.10.0160.00416.34
7.4.00.0040.01315.37
7.3.330.0000.00813.24
7.3.320.0060.00013.04
7.3.310.0000.00716.13
7.3.300.0060.00016.15
7.3.290.0190.00016.32
7.3.280.0050.01316.25
7.3.270.0190.00017.40
7.3.260.0100.01316.36
7.3.250.0110.00916.44
7.3.240.0070.01416.18
7.3.230.0130.00616.39
7.3.210.0090.00616.18
7.3.200.0080.01316.49
7.3.190.0150.00316.35
7.3.180.0100.01016.24
7.3.170.0090.01316.20
7.3.160.0110.00716.17
7.3.150.0140.00716.35
7.3.140.0050.01616.29
7.3.130.0070.01116.05
7.3.120.0090.01015.40
7.3.110.0080.01115.35
7.3.100.0140.00915.50
7.3.90.0190.00215.65
7.3.80.0110.00815.68
7.3.70.0070.00715.44
7.3.60.0080.00815.51
7.3.50.0040.01415.40
7.3.40.0090.00915.43
7.3.30.0100.00715.28
7.3.20.0110.00517.24
7.3.10.0080.01017.03
7.3.00.0060.00816.95
7.2.330.0100.00716.66
7.2.320.0100.00716.55
7.2.310.0110.00916.57
7.2.300.0150.00416.27
7.2.290.0160.00516.43
7.2.280.0090.01216.46
7.2.270.0120.01116.34
7.2.260.0050.01416.21
7.2.250.0090.00915.54
7.2.240.0130.01315.69
7.2.230.0130.00915.62
7.2.220.0110.01315.81
7.2.210.0070.01015.71
7.2.200.0080.00815.73
7.2.190.0080.01015.64
7.2.180.0100.00515.42
7.2.170.0100.00515.69
7.2.160.0060.01115.77
7.2.150.0080.00917.54
7.2.140.0060.01117.52
7.2.130.0090.01017.22
7.2.120.0080.00617.36
7.2.110.0110.00717.19
7.2.100.0100.00517.34
7.2.90.0090.00717.35
7.2.80.0080.00817.20
7.2.70.0110.00717.35
7.2.60.0070.00717.11
7.2.50.0110.00816.53
7.2.40.0330.00717.22
7.2.30.0080.01017.31
7.2.20.0160.00517.27
7.2.10.0090.00717.23
7.2.00.0070.00817.73
7.1.330.0080.01316.48
7.1.320.0140.00916.69
7.1.310.0110.00616.54
7.1.300.0170.00516.62
7.1.290.0140.00816.69
7.1.280.0130.00816.54
7.1.270.0120.00716.66
7.1.260.0110.00716.57
7.1.250.0100.00716.16
7.1.240.0140.00616.60
7.1.230.0170.00516.54
7.1.220.0160.00516.56
7.1.210.0080.01116.48
7.1.200.0140.00616.27
7.1.190.0140.00916.64
7.1.180.0120.01016.55
7.1.170.0090.01216.46
7.1.160.0100.01116.54
7.1.150.0150.00616.61
7.1.140.0130.01016.55
7.1.130.0120.00616.58
7.1.120.0120.00716.63
7.1.110.0120.00616.47
7.1.100.0130.00517.13
7.1.90.0110.00816.43
7.1.80.0110.00816.55
7.1.70.0110.00516.80
7.1.60.0110.01017.48
7.1.50.0110.00916.64
7.1.40.0160.00815.82
7.1.30.0120.01216.60
7.1.20.0160.00416.69
7.1.10.0170.00716.53
7.1.00.0150.02518.43
7.0.330.0160.00616.08
7.0.320.0150.00616.17
7.0.310.0140.00816.10
7.0.300.0150.00516.06
7.0.290.0130.00516.12
7.0.280.0110.00816.23
7.0.270.0160.00916.06
7.0.260.0130.00416.36
7.0.250.0130.00616.31
7.0.240.0090.01115.42
7.0.230.0160.00416.24
7.0.220.0120.00916.31
7.0.210.0100.00916.26
7.0.200.0060.00816.33
7.0.190.0100.01015.40
7.0.180.0100.01116.24
7.0.170.0150.00515.28
7.0.160.0180.00615.42
7.0.150.0190.00216.09
7.0.140.0190.02818.20
7.0.130.0150.00416.31
7.0.120.0100.01016.17
7.0.110.0130.00516.18
7.0.100.0140.00616.23
7.0.90.0100.00915.41
7.0.80.0090.00815.36
7.0.70.0100.00516.18
7.0.60.0100.02716.79
7.0.50.0100.03116.14
7.0.40.0100.01816.93
7.0.30.0200.03016.17
7.0.20.0390.02216.35
7.0.10.0060.02016.15
7.0.00.0090.03416.28
5.6.400.0140.00514.93
5.6.390.0160.00515.09
5.6.380.0100.00815.18
5.6.370.0130.01314.84
5.6.360.0160.00615.15
5.6.350.0120.00815.23
5.6.340.0120.01215.26
5.6.330.0140.01115.13
5.6.320.0070.01315.25
5.6.310.0070.01415.22
5.6.300.0210.00614.80
5.6.290.0120.01315.12
5.6.280.0090.02917.08
5.6.270.0140.00515.00
5.6.260.0110.01115.00
5.6.250.0070.01515.20
5.6.240.0120.00714.95
5.6.230.0090.01014.98
5.6.220.0110.00314.97
5.6.210.0110.03116.89
5.6.200.0070.02116.02
5.6.190.0100.01816.93
5.6.180.0200.03116.86
5.6.170.0170.03017.01
5.6.160.0090.01816.89
5.6.150.0140.02916.08
5.6.140.0060.02316.13
5.6.130.0110.03116.07
5.6.120.0080.01917.03
5.6.110.0100.03717.05
5.6.100.0090.03017.04
5.6.90.0110.03417.06
5.6.80.0100.03116.71
5.6.70.0100.00715.06
5.6.60.0070.01414.98
5.6.50.0080.01414.76
5.6.40.0090.00714.84
5.6.30.0080.00915.04
5.6.20.0070.00814.98
5.6.10.0070.01115.09
5.6.00.0090.01314.99
5.5.380.0110.00914.94
5.5.370.0080.01215.14
5.5.360.0090.00714.86
5.5.350.0120.03816.68
5.5.340.0110.01616.14
5.5.330.0100.03116.70
5.5.320.0220.03016.89
5.5.310.0140.02816.76
5.5.300.0060.02816.07
5.5.290.0100.02116.02
5.5.280.0130.03316.84
5.5.270.0120.03217.08
5.5.260.0070.03316.89
5.5.250.0110.02916.80
5.5.240.0160.03116.59
5.5.230.0080.01314.83
5.5.220.0070.00914.90
5.5.210.0060.01214.85
5.5.200.0070.00914.85
5.5.190.0110.00814.98
5.5.180.0100.00914.98
5.5.170.0070.01114.89
5.5.160.0120.01014.84
5.5.150.0150.01014.82
5.5.140.0120.00814.89
5.5.130.0160.00714.97
5.5.120.0070.01315.15
5.5.110.0080.01214.78
5.5.100.0070.00915.11
5.5.90.0060.01214.71
5.5.80.0120.00514.87
5.5.70.0090.01114.94
5.5.60.0060.01114.99
5.5.50.0100.01214.95
5.5.40.0110.00614.90
5.5.30.0080.01014.80
5.5.20.0140.00614.84
5.5.10.0090.01114.88
5.5.00.0100.00914.66
5.4.450.0150.02014.99
5.4.440.0110.02114.88
5.4.430.0220.02114.87
5.4.420.0120.01814.97
5.4.410.0110.02114.96
5.4.400.0110.01614.77
5.4.390.0150.01914.73
5.4.380.0300.02614.55
5.4.370.0400.02214.61
5.4.360.0390.02014.70
5.4.350.0350.03514.62
5.4.340.0460.02214.69
5.4.330.0110.00512.59
5.4.320.0090.01512.63
5.4.310.0070.01912.56
5.4.300.0030.02112.60
5.4.290.0090.02012.56
5.4.280.0050.01712.54
5.4.270.0040.01612.55
5.4.260.0070.01812.52
5.4.250.0060.01812.52
5.4.240.0070.01812.53
5.4.230.0030.01912.55
5.4.220.0020.01912.50
5.4.210.0070.01712.55
5.4.200.0120.01412.53
5.4.190.0080.01912.62
5.4.180.0040.01812.49
5.4.170.0090.01512.56
5.4.160.0100.01312.50
5.4.150.0090.01312.53
5.4.140.0060.01612.41
5.4.130.0070.01612.53
5.4.120.0080.01512.42
5.4.110.0070.01512.38
5.4.100.0070.01512.44
5.4.90.0070.02012.36
5.4.80.0090.01812.44
5.4.70.0040.01612.45
5.4.60.0070.01612.40
5.4.50.0090.01612.42
5.4.40.0080.01612.44
5.4.30.0080.01912.39
5.4.20.0060.01612.40
5.4.10.0060.02112.44
5.4.00.0050.02512.23
5.3.290.0140.02312.94
5.3.280.0120.02512.80
5.3.270.0100.02412.84
5.3.260.0060.02712.91
5.3.250.0020.03012.91
5.3.240.0090.02212.79
5.3.230.0080.02512.80
5.3.220.0090.02412.80
5.3.210.0100.02312.80
5.3.200.0090.02212.80
5.3.190.0130.03112.78
5.3.180.0130.02512.83
5.3.170.0040.02612.89
5.3.160.0090.02212.84
5.3.150.0060.02912.85
5.3.140.0080.02812.86
5.3.130.0080.02312.84
5.3.120.0090.03212.85
5.3.110.0080.02612.78
5.3.100.0110.02212.57
5.3.90.0130.02312.56
5.3.80.0130.02112.53
5.3.70.0120.02212.45
5.3.60.0080.02412.58
5.3.50.0070.02512.43
5.3.40.0090.02112.48
5.3.30.0080.02212.50
5.3.20.0100.02012.38
5.3.10.0100.02312.23
5.3.00.0110.02112.28
5.2.170.0060.02110.60
5.2.160.0060.02310.66
5.2.150.0080.02310.67
5.2.140.0060.02410.56
5.2.130.0050.02710.61
5.2.120.0100.02210.57
5.2.110.0120.01610.57
5.2.100.0090.01710.55
5.2.90.0040.02710.63
5.2.80.0050.02210.54
5.2.70.0060.01910.54
5.2.60.0040.02210.53
5.2.50.0080.02310.54
5.2.40.0080.02110.52
5.2.30.0050.01910.47
5.2.20.0040.02710.47
5.2.10.0070.02210.42
5.2.00.0100.01410.35
5.1.60.0090.0179.99
5.1.50.0100.0139.99
5.1.40.0050.0159.98
5.1.30.0020.02210.16
5.1.20.0100.01410.17
5.1.10.0060.01710.03
5.1.00.0040.01810.03
5.0.50.0040.0139.27
5.0.40.0040.0159.20
5.0.30.0060.0189.11
5.0.20.0050.0139.09
5.0.10.0010.0159.08
5.0.00.0060.0239.08
4.4.90.0010.0128.34
4.4.80.0080.0098.33
4.4.70.0030.0118.33
4.4.60.0050.0088.33
4.4.50.0010.0128.34
4.4.40.0050.0138.30
4.4.30.0020.0108.33
4.4.20.0010.0128.38
4.4.10.0030.0108.38
4.4.00.0050.0148.33
4.3.110.0050.0108.29
4.3.100.0040.0088.29
4.3.90.0030.0098.27
4.3.80.0050.0138.24
4.3.70.0040.0088.27
4.3.60.0020.0098.26
4.3.50.0040.0098.27
4.3.40.0060.0148.22
4.3.30.0030.0117.60
4.3.20.0030.0107.59
4.3.10.0010.0127.57
4.3.00.0040.00913.77

preferences:
30.05 ms | 401 KiB | 5 Q