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); $response = str_replace("\u003e", ">", $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.40.0150.00018.71
8.3.30.0070.01019.09
8.3.20.0000.00720.10
8.3.10.0040.00423.66
8.3.00.0040.00419.13
8.2.170.0170.00322.96
8.2.160.0100.00320.52
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00021.03
8.2.110.0040.00420.52
8.2.100.0120.00017.79
8.2.90.0000.00818.28
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0030.00517.80
8.2.50.0060.00318.07
8.2.40.0050.00319.88
8.2.30.0040.00417.93
8.2.20.0050.00217.71
8.2.10.0000.00818.10
8.2.00.0040.00417.78
8.1.270.0030.00523.79
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.06
8.1.230.0070.00420.85
8.1.220.0030.00517.79
8.1.210.0080.00019.04
8.1.200.0070.00317.22
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0040.00418.60
8.1.160.0070.00021.85
8.1.150.0000.00718.86
8.1.140.0050.00217.43
8.1.130.0000.00717.88
8.1.120.0030.00317.44
8.1.110.0000.00717.28
8.1.100.0000.00717.43
8.1.90.0040.00317.28
8.1.80.0000.00717.37
8.1.70.0070.00017.41
8.1.60.0000.00817.55
8.1.50.0040.00417.34
8.1.40.0040.00417.43
8.1.30.0030.00617.61
8.1.20.0040.00417.51
8.1.10.0000.00817.39
8.1.00.0070.00017.41
8.0.300.0000.00820.14
8.0.290.0000.00716.63
8.0.280.0050.00318.44
8.0.270.0050.00317.25
8.0.260.0030.00317.30
8.0.250.0040.00416.92
8.0.240.0030.00316.95
8.0.230.0070.00016.75
8.0.220.0030.00316.87
8.0.210.0000.00716.70
8.0.200.0000.00616.85
8.0.190.0080.00016.87
8.0.180.0000.00716.86
8.0.170.0020.00516.88
8.0.160.0050.00316.89
8.0.150.0000.00816.74
8.0.140.0070.00316.67
8.0.130.0030.00313.21
8.0.120.0000.00816.84
8.0.110.0050.00216.89
8.0.100.0000.00716.77
8.0.90.0000.00716.71
8.0.80.0130.00916.82
8.0.70.0040.00416.71
8.0.60.0000.00716.83
8.0.50.0020.00516.76
8.0.30.0080.01116.85
8.0.20.0130.00617.40
8.0.10.0030.00616.99
8.0.00.0110.00716.76
7.4.330.0050.00015.05
7.4.320.0060.00016.55
7.4.300.0000.00616.42
7.4.290.0070.00016.45
7.4.280.0040.00416.57
7.4.270.0040.00416.42
7.4.260.0070.00016.49
7.4.250.0000.00716.41
7.4.240.0030.00416.47
7.4.230.0030.00316.54
7.4.220.0100.00716.49
7.4.210.0150.00616.45
7.4.200.0030.00516.23
7.4.160.0110.00616.52
7.4.150.0090.00917.40
7.4.140.0080.00817.86
7.4.130.0100.00616.53
7.4.120.0110.00916.45
7.4.110.0090.00916.46
7.4.100.0100.01016.39
7.4.90.0100.00716.39
7.4.80.0090.00919.39
7.4.70.0070.01316.16
7.4.60.0120.00816.28
7.4.50.0080.00416.26
7.4.40.0060.01316.13
7.4.30.0070.01116.13
7.4.20.0090.00916.25
7.4.10.0050.01315.44
7.4.00.0060.00915.48
7.3.330.0040.00413.07
7.3.320.0000.00713.12
7.3.310.0000.00716.11
7.3.300.0000.00716.23
7.3.290.0000.01416.21
7.3.280.0030.01516.26
7.3.270.0070.01717.40
7.3.260.0070.01416.27
7.3.250.0120.00416.37
7.3.240.0130.00316.17
7.3.230.0060.01016.58
7.3.210.0030.01416.22
7.3.200.0120.00416.36
7.3.190.0100.00916.55
7.3.180.0080.01116.35
7.3.170.0090.00916.22
7.3.160.0070.00916.18
7.3.150.0130.00316.02
7.3.140.0130.00616.35
7.3.130.0050.01115.48
7.3.120.0100.00515.24
7.3.110.0060.01015.22
7.3.100.0040.01215.30
7.3.90.0090.00915.36
7.3.80.0060.00815.29
7.3.70.0060.00915.18
7.3.60.0080.00615.10
7.3.50.0100.00615.29
7.3.40.0090.00615.23
7.3.30.0060.00615.15
7.3.20.0070.00716.41
7.3.10.0070.00816.32
7.3.00.0070.00716.38
7.2.330.0110.00516.75
7.2.320.0030.01516.57
7.2.310.0060.01116.59
7.2.300.0100.00616.63
7.2.290.0080.01116.46
7.2.280.0080.01116.41
7.2.270.0110.00516.34
7.2.260.0090.00715.69
7.2.250.0080.00815.61
7.2.240.0090.00815.37
7.2.230.0090.00915.55
7.2.220.0070.01115.45
7.2.210.0070.00915.45
7.2.200.0020.01115.46
7.2.190.0070.01015.35
7.2.180.0060.01115.42
7.2.170.0070.01115.38
7.2.160.0110.00615.41
7.2.150.0060.00916.75
7.2.140.0060.00916.73
7.2.130.0080.00716.52
7.2.120.0070.00816.67
7.2.110.0030.01116.63
7.2.100.0060.00816.66
7.2.90.0490.00616.67
7.2.80.0090.00616.64
7.2.70.0040.01016.74
7.2.60.0080.00916.69
7.2.50.0050.01016.74
7.2.40.0060.01016.70
7.2.30.0070.00816.66
7.2.20.0050.00916.74
7.2.10.0070.00816.65
7.2.00.0140.00617.22
7.1.330.0120.00715.75
7.1.320.0120.00815.76
7.1.310.0100.00815.78
7.1.300.0070.00915.62
7.1.290.0070.00915.74
7.1.280.0080.00815.71
7.1.270.0170.01015.59
7.1.260.0070.01015.67
7.1.250.0040.00815.62
7.1.240.0080.00815.68
7.1.230.0120.00815.73
7.1.220.0100.00615.63
7.1.210.0090.00715.65
7.1.200.0060.01115.66
7.1.190.0140.00715.75
7.1.180.0090.00815.69
7.1.170.0100.00515.77
7.1.160.0080.01115.60
7.1.150.0120.00915.69
7.1.140.0100.01015.72
7.1.130.0090.01015.66
7.1.120.0110.00715.56
7.1.110.0150.00515.79
7.1.100.0090.00816.23
7.1.90.0150.00615.74
7.1.80.0190.00715.63
7.1.70.0080.01016.17
7.1.60.0080.01116.58
7.1.50.0090.01016.12
7.1.40.0100.00715.83
7.1.30.0180.00915.75
7.1.20.0120.00515.73
7.1.10.0090.01015.88
7.1.00.0080.02517.33
7.0.330.0070.00715.37
7.0.320.0110.00815.26
7.0.310.0120.00415.29
7.0.300.0130.00615.29
7.0.290.0320.00715.27
7.0.280.0090.00915.29
7.0.270.0060.01015.12
7.0.260.0120.00715.41
7.0.250.0110.00915.32
7.0.240.0100.00715.31
7.0.230.0130.00515.31
7.0.220.0120.00715.28
7.0.210.0140.00315.41
7.0.200.0100.00515.56
7.0.190.0100.00615.37
7.0.180.0110.00515.36
7.0.170.0060.01115.27
7.0.160.0130.00515.24
7.0.150.0090.00715.24
7.0.140.0060.02616.90
7.0.130.0080.00915.31
7.0.120.0110.00515.30
7.0.110.0070.01115.27
7.0.100.0100.00415.43
7.0.90.0100.00815.42
7.0.80.0080.01215.43
7.0.70.0120.00415.42
7.0.60.0060.02516.88
7.0.50.0150.01815.92
7.0.40.0080.02215.62
7.0.30.0160.02215.53
7.0.20.0160.01715.56
7.0.10.0130.02415.64
7.0.00.0100.01715.55
5.6.400.0070.01015.08
5.6.390.0100.00814.97
5.6.380.0110.00614.71
5.6.370.0110.00814.79
5.6.360.0070.01114.72
5.6.350.0090.01014.71
5.6.340.0090.00914.77
5.6.330.0110.00614.90
5.6.320.0110.00714.66
5.6.310.0090.01014.82
5.6.300.0100.00814.82
5.6.290.0090.00914.73
5.6.280.0100.02416.35
5.6.270.0120.00514.59
5.6.260.0070.01214.67
5.6.250.0080.01114.70
5.6.240.0130.00614.91
5.6.230.0100.01214.79
5.6.220.0140.00514.71
5.6.210.0070.01816.17
5.6.200.0100.01815.69
5.6.190.0100.02316.21
5.6.180.0110.01516.13
5.6.170.0140.02716.17
5.6.160.0070.02716.21
5.6.150.0090.01715.79
5.6.140.0110.02215.60
5.6.130.0100.01615.61
5.6.120.0100.02416.38
5.6.110.0080.02716.31
5.6.100.0050.01916.27
5.6.90.0130.01916.27
5.6.80.0110.02216.08
5.6.70.0080.00914.64
5.6.60.0100.00614.64
5.6.50.0060.00814.88
5.6.40.0040.01414.72
5.6.30.0090.00614.81
5.6.20.0120.00414.68
5.6.10.0070.00914.70
5.6.00.0100.00814.67
5.5.380.0080.00913.48
5.5.370.0080.00913.64
5.5.360.0080.00713.51
5.5.350.1050.02015.33
5.5.340.0070.01514.70
5.5.330.0070.02815.27
5.5.320.0140.02015.39
5.5.310.0150.01415.33
5.5.300.0060.01714.67
5.5.290.0050.02214.68
5.5.280.0100.01715.53
5.5.270.0070.02815.50
5.5.260.0090.02415.46
5.5.250.0090.02415.39
5.5.240.0120.02015.37
5.5.230.0080.00613.57
5.5.220.0050.00713.64
5.5.210.0080.01013.68
5.5.200.0040.01213.55
5.5.190.0080.00813.66
5.5.180.0110.00613.72
5.5.170.0060.01013.61
5.5.160.0060.00713.65
5.5.150.0080.01013.70
5.5.140.0070.00813.58
5.5.130.0060.00913.74
5.5.120.0100.00813.69
5.5.110.0110.00813.74
5.5.100.0070.00913.56
5.5.90.0070.01013.57
5.5.80.0060.01013.66
5.5.70.0100.00813.62
5.5.60.0070.00913.40
5.5.50.0070.01113.69
5.5.40.0110.00913.51
5.5.30.0060.01213.61
5.5.20.0090.01013.58
5.5.10.0100.00813.56
5.5.00.0080.00913.55
5.4.450.0130.01313.93
5.4.440.0070.02113.91
5.4.430.0090.01814.03
5.4.420.0140.01513.90
5.4.410.0120.01413.93
5.4.400.0130.01513.87
5.4.390.0070.01913.91
5.4.380.0300.02013.76
5.4.370.0340.01613.74
5.4.360.0320.01713.86
5.4.350.0300.01713.70
5.4.340.0280.02113.85
5.4.330.0080.00512.12
5.4.320.0060.01212.22
5.4.310.0070.01512.29
5.4.300.0080.01312.24
5.4.290.0040.01512.18
5.4.280.0040.01612.14
5.4.270.0070.01412.19
5.4.260.0050.01412.20
5.4.250.0060.01512.19
5.4.240.0050.01612.10
5.4.230.0070.01412.23
5.4.220.0070.01312.18
5.4.210.0100.01212.10
5.4.200.0070.01612.21
5.4.190.0070.01712.18
5.4.180.0050.01212.20
5.4.170.0040.01712.13
5.4.160.0090.01312.26
5.4.150.0060.01412.19
5.4.140.0090.01412.18
5.4.130.0100.01212.11
5.4.120.0060.01412.17
5.4.110.0070.01312.14
5.4.100.0070.01312.02
5.4.90.0050.01412.09
5.4.80.0050.01512.07
5.4.70.0060.01312.12
5.4.60.0070.01412.04
5.4.50.0080.01412.16
5.4.40.0090.01312.18
5.4.30.0080.01412.17
5.4.20.0080.01212.04
5.4.10.0050.01412.14
5.4.00.0090.01212.05
5.3.290.0040.01812.13
5.3.280.0120.02012.10
5.3.270.0110.01512.14
5.3.260.0060.02012.09
5.3.250.0050.02112.11
5.3.240.0100.01811.99
5.3.230.0090.01912.04
5.3.220.0030.02111.92
5.3.210.0080.01811.93
5.3.200.0050.01911.92
5.3.190.0060.02111.97
5.3.180.0060.01812.06
5.3.170.0060.02012.10
5.3.160.0060.01912.00
5.3.150.0080.01812.06
5.3.140.0080.01612.05
5.3.130.0110.01511.99
5.3.120.0050.02012.07
5.3.110.0090.01611.98
5.3.100.0090.01611.90
5.3.90.0120.01611.91
5.3.80.0080.01711.81
5.3.70.0080.01711.71
5.3.60.0110.01411.89
5.3.50.0080.01511.83
5.3.40.0060.01911.74
5.3.30.0070.01911.84
5.3.20.0070.01811.71
5.3.10.0070.01611.56
5.3.00.0060.01611.55
5.2.170.0090.01210.49
5.2.160.0050.01610.46
5.2.150.0060.01410.53
5.2.140.0090.01310.50
5.2.130.0060.01410.45
5.2.120.0070.01410.52
5.2.110.0030.01610.48
5.2.100.0080.01210.48
5.2.90.0060.01510.51
5.2.80.0030.01910.49
5.2.70.0090.01310.45
5.2.60.0060.01910.43
5.2.50.0050.01510.42
5.2.40.0090.01310.43
5.2.30.0080.01410.40
5.2.20.0070.01410.40
5.2.10.0060.01210.37
5.2.00.0080.01310.32
5.1.60.0070.01210.08
5.1.50.0070.01310.08
5.1.40.0050.01210.07
5.1.30.0030.01310.19
5.1.20.0040.01510.20
5.1.10.0060.01110.11
5.1.00.0060.01210.11
5.0.50.0050.0099.60
5.0.40.0070.0079.55
5.0.30.0060.0129.49
5.0.20.0050.0099.48
5.0.10.0020.0109.47
5.0.00.0020.0189.47
4.4.90.0050.0088.98
4.4.80.0030.0098.97
4.4.70.0040.0078.97
4.4.60.0040.0088.97
4.4.50.0020.0098.98
4.4.40.0020.0108.96
4.4.30.0010.0098.97
4.4.20.0050.0079.00
4.4.10.0070.0059.00
4.4.00.0010.0128.97
4.3.110.0020.0098.94
4.3.100.0020.0108.94
4.3.90.0040.0098.93
4.3.80.0030.0138.91
4.3.70.0020.0098.93
4.3.60.0030.0098.93
4.3.50.0030.0108.93
4.3.40.0030.0128.90
4.3.30.0060.0068.49
4.3.20.0030.0088.48
4.3.10.0020.0098.47
4.3.00.0020.00912.60

preferences:
41.93 ms | 400 KiB | 5 Q