3v4l.org

run code in 300+ PHP versions simultaneously
<?php $orig = PHP_VERSION_ID < 50600 ? iconv_get_encoding('internal_encoding') : ini_get('default_charset'); if (PHP_VERSION_ID < 50600) { if ($encoding) { $result = iconv_set_encoding('internal_encoding', $encoding); } else { $result = false; } } else { ini_set('default_charset', $encoding); $result = ini_get('default_charset'); } if (!$result) { echo 'Given encoding not supported on this OS!'; } else { echo 'All good'; }

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.0060.00916.75
8.3.50.0060.01516.46
8.3.40.0150.00918.65
8.3.30.0070.00718.75
8.3.20.0000.00820.34
8.3.10.0040.00421.53
8.3.00.0040.00420.34
8.2.180.0060.01218.42
8.2.170.0080.00822.96
8.2.160.0130.00320.52
8.2.150.0070.01124.18
8.2.140.0080.00024.66
8.2.130.0070.00019.35
8.2.120.0040.00426.35
8.2.110.0060.00322.14
8.2.100.0080.00418.03
8.2.90.0000.00818.03
8.2.80.0080.00017.97
8.2.70.0040.00817.63
8.2.60.0050.00317.93
8.2.50.0040.00418.10
8.2.40.0080.00022.28
8.2.30.0040.00421.02
8.2.20.0040.00417.93
8.2.10.0040.00417.98
8.2.00.0000.00718.06
8.1.280.0070.00725.92
8.1.270.0180.00022.02
8.1.260.0120.00626.35
8.1.250.0020.00528.09
8.1.240.0080.00324.02
8.1.230.0040.00720.90
8.1.220.0000.00817.74
8.1.210.0030.00618.89
8.1.200.0040.00417.35
8.1.190.0030.00817.25
8.1.180.0060.00318.10
8.1.170.0040.00418.64
8.1.160.0070.00018.93
8.1.150.0040.00420.70
8.1.140.0080.00019.49
8.1.130.0000.00818.81
8.1.120.0040.00417.41
8.1.110.0040.00417.27
8.1.100.0000.00717.48
8.1.90.0060.00317.36
8.1.80.0040.00417.45
8.1.70.0000.00717.36
8.1.60.0070.00017.65
8.1.50.0070.00317.54
8.1.40.0050.00317.38
8.1.30.0000.00717.55
8.1.20.0040.00417.67
8.1.10.0030.00517.52
8.1.00.0000.00817.38
8.0.300.0040.00419.89
8.0.290.0070.00016.75
8.0.280.0000.00818.49
8.0.270.0090.00017.31
8.0.260.0080.00016.75
8.0.250.0040.00316.91
8.0.240.0030.00717.01
8.0.230.0000.00716.85
8.0.220.0070.00016.86
8.0.210.0000.00716.88
8.0.200.0040.00416.91
8.0.190.0030.00616.97
8.0.180.0050.00316.86
8.0.170.0000.01116.97
8.0.160.0050.00316.87
8.0.150.0040.00416.98
8.0.140.0050.00216.77
8.0.130.0050.00013.36
8.0.120.0000.00916.90
8.0.110.0000.00716.86
8.0.100.0000.00716.84
8.0.90.0000.00816.99
8.0.80.0130.00316.95
8.0.70.0000.00716.91
8.0.60.0060.00317.00
8.0.50.0070.00016.93
8.0.30.0100.00817.04
8.0.20.0070.01217.40
8.0.10.0050.00316.98
8.0.00.0030.01417.02
7.4.330.0020.00215.55
7.4.320.0000.00616.64
7.4.300.0060.00016.64
7.4.290.0070.00016.48
7.4.280.0030.00316.56
7.4.270.0030.00316.69
7.4.260.0030.00316.57
7.4.250.0040.00416.67
7.4.240.0030.00516.48
7.4.230.0030.00316.56
7.4.220.0150.01116.73
7.4.210.0120.00316.68
7.4.200.0030.00316.71
7.4.160.0050.01016.59
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0060.01816.48
7.4.120.0100.01016.72
7.4.110.0090.00916.60
7.4.100.0090.00616.64
7.4.90.0130.00616.48
7.4.80.0100.00719.39
7.4.70.0100.00716.57
7.4.60.0130.00316.47
7.4.50.0050.00916.63
7.4.40.0090.00916.57
7.4.30.0130.00316.44
7.4.00.0080.00814.93
7.3.330.0030.00313.20
7.3.320.0000.00613.11
7.3.310.0000.00716.36
7.3.300.0000.00716.30
7.3.290.0080.00716.28
7.3.280.0070.00816.24
7.3.270.0090.00917.40
7.3.260.0110.00716.28
7.3.250.0050.01316.48
7.3.240.0090.01116.35
7.3.230.0040.01216.62
7.3.210.0130.00616.55
7.3.200.0030.01316.35
7.3.190.0090.00916.46
7.3.180.0100.01016.34
7.3.170.0060.01116.44
7.3.160.0080.00816.58
7.3.120.0110.00315.00
7.3.110.0040.01114.98
7.3.100.0060.00914.99
7.3.90.0000.01314.79
7.3.80.0030.00614.93
7.3.70.0060.00314.61
7.3.60.0080.00414.45
7.3.50.0000.00914.73
7.3.40.0040.01114.85
7.3.30.0070.00714.70
7.3.20.0040.00716.75
7.3.10.0130.00316.59
7.3.00.0090.00316.29
7.2.330.0070.01416.69
7.2.320.0110.01216.66
7.2.310.0030.01316.60
7.2.300.0080.00816.33
7.2.290.0090.00916.72
7.2.240.0040.00714.97
7.2.230.0030.00614.89
7.2.220.0080.00815.15
7.2.210.0030.01315.22
7.2.200.0030.01315.12
7.2.190.0030.01414.83
7.2.180.0000.01514.99
7.2.170.0030.01014.91
7.2.160.0000.01814.83
7.2.150.0070.01116.71
7.2.140.0000.01017.04
7.2.130.0180.00016.83
7.2.120.0040.01116.58
7.2.110.0000.01216.80
7.2.100.0070.01016.89
7.2.90.0030.01316.91
7.2.80.0060.00616.91
7.2.70.0070.01117.00
7.2.60.0070.00716.88
7.2.50.0000.01616.79
7.2.40.0090.00916.89
7.2.30.0060.00916.73
7.2.20.0000.01316.86
7.2.10.0070.01016.59
7.2.00.0110.00318.19
7.1.330.0060.00915.80
7.1.320.0080.00815.65
7.1.310.0070.00715.87
7.1.300.0030.01015.77
7.1.290.0030.00915.75
7.1.280.0040.00415.58
7.1.270.0070.00715.54
7.1.260.0030.01015.71
7.1.250.0110.00315.59
7.1.200.0120.00315.89
7.1.100.0030.00718.01
7.1.70.0100.01017.04
7.1.60.0230.01835.09
7.1.50.0320.00934.43
7.1.40.0230.01734.34
7.1.30.0150.02234.58
7.1.20.0220.01634.53
7.1.10.0240.01014.75
7.1.00.0000.02016.50
7.0.200.0150.00416.46
7.0.190.0120.00616.66
7.0.180.0120.00816.23
7.0.170.0030.01416.10
7.0.160.0300.00814.48
7.0.150.0260.01014.36
7.0.140.0060.00916.45
7.0.130.0150.01114.61
7.0.120.0040.01216.49
7.0.110.0040.01416.12
7.0.100.0000.01716.21
7.0.90.0090.00616.41
7.0.80.0060.00916.17
7.0.70.0090.00916.25
7.0.60.0050.01415.82
7.0.50.0180.01214.53
7.0.40.0060.01416.58
7.0.30.0200.01414.51
7.0.20.0270.00814.30
7.0.10.0240.01014.42
7.0.00.0130.01016.31

preferences:
43.43 ms | 401 KiB | 5 Q