3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = @iconv_mime_encode('', $str, array( 'scheme' => 'Q', 'line-length' => 76, 'input-charset' => 'UTF-8', 'output-charset' => 'UTF-8', 'line-break-chars' => "\n" ) ); // There are reports that iconv_mime_encode() might fail and return FALSE //if ($output !== FALSE) //{ // iconv_mime_encode() will always put a header field name. // We've passed it an empty one, but it still prepends our // encoded string with ': ', so we need to strip it. echo substr($output, 2); //} // $chars = iconv_strlen($str, 'UTF-8');

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.0110.00416.73
8.3.50.0120.00918.30
8.3.40.0070.01118.54
8.3.30.0110.00418.77
8.3.20.0000.00720.38
8.3.10.0040.00423.61
8.3.00.0050.00319.50
8.2.180.0150.00316.50
8.2.170.0040.01222.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0060.00322.20
8.2.100.0090.00318.05
8.2.90.0000.00819.27
8.2.80.0090.00017.97
8.2.70.0080.00017.63
8.2.60.0040.00818.05
8.2.50.0000.00818.07
8.2.40.0030.00619.26
8.2.30.0070.00020.51
8.2.20.0040.00417.71
8.2.10.0000.00917.98
8.2.00.0070.00017.94
8.1.270.0060.00323.79
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.01022.54
8.1.230.0080.00419.54
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0040.00417.10
8.1.180.0000.00718.10
8.1.170.0040.00418.63
8.1.160.0000.00721.93
8.1.150.0040.00418.89
8.1.140.0000.00819.52
8.1.130.0000.00817.77
8.1.120.0000.00717.54
8.1.110.0090.00017.47
8.1.100.0050.00317.41
8.1.90.0040.00417.53
8.1.80.0080.00017.37
8.1.70.0000.00717.43
8.1.60.0090.00017.49
8.1.50.0000.00817.58
8.1.40.0030.00517.50
8.1.30.0030.00517.56
8.1.20.0070.00017.65
8.1.10.0040.00417.51
8.1.00.0020.00517.39
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.44
8.0.270.0030.00517.18
8.0.260.0050.00317.26
8.0.250.0030.00316.94
8.0.240.0030.00317.02
8.0.230.0000.00717.07
8.0.220.0030.00316.83
8.0.210.0040.00416.84
8.0.200.0060.00017.07
8.0.190.0050.00517.00
8.0.180.0040.00416.86
8.0.170.0000.00716.92
8.0.160.0040.00417.00
8.0.150.0000.00716.93
8.0.140.0080.00016.88
8.0.130.0030.00313.42
8.0.120.0030.00617.06
8.0.110.0040.00417.05
8.0.100.0030.00617.04
8.0.90.0040.00417.12
8.0.80.0040.01817.07
8.0.70.0000.00917.16
8.0.60.0030.00617.13
8.0.50.0030.00617.16
8.0.30.0130.00817.22
8.0.20.0100.01417.41
8.0.10.0030.00717.12
8.0.00.0110.01516.78
7.4.330.0030.00315.14
7.4.320.0030.00316.56
7.4.300.0000.00716.49
7.4.290.0040.00416.38
7.4.280.0000.00916.40
7.4.270.0000.00616.63
7.4.260.0030.00316.56
7.4.250.0060.00316.64
7.4.240.0040.00416.61
7.4.230.0000.00816.54
7.4.220.0070.01416.72
7.4.210.0130.00716.78
7.4.200.0040.00416.78
7.4.160.0100.01316.59
7.4.150.0110.01117.40
7.4.140.0070.01817.86
7.4.130.0100.01016.55
7.4.120.0090.01216.73
7.4.110.0060.02016.61
7.4.100.0090.01516.66
7.4.90.0090.00916.50
7.4.80.0110.01119.39
7.4.70.0070.01116.68
7.4.60.0060.01516.64
7.4.50.0050.00616.66
7.4.40.0190.00716.78
7.4.30.0090.01516.55
7.4.00.0100.01015.33
7.3.330.0070.00013.15
7.3.320.0000.00513.12
7.3.310.0060.00316.34
7.3.300.0060.00316.32
7.3.290.0050.01216.29
7.3.280.0090.01116.35
7.3.270.0170.00317.40
7.3.260.0080.01216.24
7.3.250.0070.01316.39
7.3.240.0110.01216.51
7.3.230.0150.00616.39
7.3.210.0100.01016.38
7.3.200.0100.01616.42
7.3.190.0140.00716.45
7.3.180.0110.01016.36
7.3.170.0110.00716.36
7.3.160.0150.00316.28
7.2.330.0070.02116.57
7.2.320.0140.00716.88
7.2.310.0070.01416.77
7.2.300.0090.00916.83
7.2.290.0070.01416.77
7.2.60.0070.01017.02
7.2.00.0100.00619.21
7.1.200.0060.00615.95
7.1.100.0040.01118.07
7.1.70.0030.01017.16
7.1.60.0100.01719.48
7.1.50.0070.00717.25
7.1.00.0000.08322.64
7.0.200.0120.00315.05
7.0.60.0130.07319.90
7.0.50.0130.07017.92
7.0.40.0030.09020.23
7.0.30.0200.04720.26
7.0.20.0270.09020.37
7.0.10.0100.07720.18
7.0.00.0130.08320.27
5.6.280.0070.07321.29
5.6.210.0100.05320.47
5.6.200.0100.06718.24
5.6.190.0130.07320.58
5.6.180.0270.04020.73
5.6.170.0330.07320.65
5.6.160.0070.04020.64
5.6.150.0030.06018.34
5.6.140.0000.08718.30
5.6.130.0170.07318.38
5.6.120.0130.07721.14
5.6.110.0100.08021.29
5.6.100.0070.08321.04
5.6.90.0100.04721.25
5.6.80.0100.07020.66
5.5.350.4200.04720.40
5.5.340.0100.07718.09
5.5.330.0130.07320.31
5.5.320.0070.06720.34
5.5.310.0270.03720.43
5.5.300.0130.07318.11
5.5.290.0230.07018.14
5.5.280.0170.07320.85
5.5.270.0030.04320.91
5.5.260.0300.05720.89
5.5.250.0030.06720.80
5.5.240.0200.05720.48

preferences:
56.1 ms | 400 KiB | 5 Q