3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mlUtf8FixString($string) { if (false && function_exists('mb_convert_encoding')) { echo "mb_convert_encoding\n"; @ini_set('mbstring.substitute_character', "none"); $string = mb_convert_encoding($string, 'UTF-8', 'UTF-8'); } else if (function_exists('iconv')) { echo "iconv\n"; // This might not work due to a bug in php // See: https://bugs.php.net/bug.php?id=48147, https://bugs.php.net/bug.php?id=52211, https://bugs.php.net/bug.php?id=61484 $s = @iconv("UTF-8", "UTF-8//IGNORE", $string); if ($s !== false) { $string = $s; } } return $string; } header('Content-Type: text/plain; charset="UTF-8"'); var_dump(mlUtf8FixString(' äöüß ነው። ማንም ሰው ይህን መዝገበ ዕውቀት ကျွန်း​စု​မြို့​နယ်၊ တနင်္သာရီ​မြို့​နယ်၊ សព្វវចនាធិប្បាយសេរីសម្រាប់អ្នកទាំងអស់គ្នា។ ຈະຊອກຫາອີ່ຫຍັງອັນໃດກໍບໍ່ຄ່ອຍມີ Mỹ đưa quân tăng viện đến արկածային գրականության դասական История проектирования არასოდეს დაუტოვებიათ ᑐᙵᓱᒃᑐᐃᓐᓇᐅᓕᑦᑎ ᐅᐃᑭᐅᖃᓕᒫᒐᕐᔪᐊᖕᒧᑦ ᐃᓄᒃᑎᑐᓐ Πρωταγωνίστησε σε πολλές આ ઉપરાંત વિકિપીડિયામાં અત્યારે અનેક લેખો તૈયાર ཝེ་ཁེ་རིག་མཛོད་ནི་རང་དབང་གི་རིག་གནས་ཀུན་བཏུས་དཔེ་མཛོད་ཅིག་ཡིན་ལ་ विकिपीडिया सभी विषयों पर प्रामाणिक और 이후로, 토론토 지하철은 현재 位久经苦难的黑奴汤姆叔叔的故事展开 مرحبا بكم في ويكيبيديا بخط الثلث איינשטעלן א סיסטעם אין וועלכע פראפערט ဖြစ်ပေါ်​နေ​သည့် မြေနိမ့်​ချိုမ့်​ဝှမ်း​များ​၌ ပေါက်ရောက်​သည့် পৰা ১০ম শতিকাৰ ভিতৰত বিকাশ হোৱা A broken UTF-8 sequence: ['."\xEB\x6C\x65\x20".'] EOF '));

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.0070.00718.43
8.3.50.0110.01021.94
8.3.40.0000.01418.56
8.3.30.0070.00719.09
8.3.20.0050.00320.29
8.3.10.0040.00423.65
8.3.00.0000.00720.88
8.2.180.0090.01216.50
8.2.170.0110.00422.96
8.2.160.0030.01020.29
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.57
8.2.110.0110.00321.07
8.2.100.0080.00417.93
8.2.90.0040.00419.08
8.2.80.0080.00017.97
8.2.70.0000.00917.63
8.2.60.0030.00618.05
8.2.50.0030.00518.07
8.2.40.0040.00419.88
8.2.30.0000.00718.28
8.2.20.0030.00517.66
8.2.10.0040.00418.20
8.2.00.0040.00417.66
8.1.280.0210.00025.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00421.95
8.1.230.0030.00818.98
8.1.220.0040.00417.78
8.1.210.0060.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00817.22
8.1.180.0080.00018.10
8.1.170.0040.00418.57
8.1.160.0040.00421.98
8.1.150.0000.00818.62
8.1.140.0040.00417.45
8.1.130.0030.00317.86
8.1.120.0000.00817.52
8.1.110.0030.00517.46
8.1.100.0000.00717.36
8.1.90.0040.00417.40
8.1.80.0000.00717.48
8.1.70.0000.00717.41
8.1.60.0000.00717.51
8.1.50.0050.00317.53
8.1.40.0040.00417.61
8.1.30.0000.00817.74
8.1.20.0000.00817.67
8.1.10.0000.00817.56
8.1.00.0030.00517.38
8.0.300.0020.00518.77
8.0.290.0000.00717.01
8.0.280.0070.00018.39
8.0.270.0050.00217.29
8.0.260.0050.00317.29
8.0.250.0000.00717.08
8.0.240.0080.00017.10
8.0.230.0030.00317.06
8.0.220.0000.01016.93
8.0.210.0050.00316.90
8.0.200.0000.00617.01
8.0.190.0080.00017.04
8.0.180.0000.00917.04
8.0.170.0040.00416.92
8.0.160.0000.00716.98
8.0.150.0080.00016.93
8.0.140.0040.00416.84
8.0.130.0050.00013.33
8.0.120.0000.01017.03
8.0.110.0030.00617.10
8.0.100.0060.00316.98
8.0.90.0000.00916.92
8.0.80.0120.01217.13
8.0.70.0030.00617.24
8.0.60.0030.00617.18
8.0.50.0030.00617.11
8.0.30.0070.01317.33
8.0.20.0140.00717.40
8.0.10.0030.00617.31
8.0.00.0060.01517.15
7.4.330.0050.00015.00
7.4.320.0030.00316.56
7.4.300.0000.00816.68
7.4.290.0030.00316.65
7.4.280.0000.00716.64
7.4.270.0040.00316.55
7.4.260.0030.00316.40
7.4.250.0060.00316.57
7.4.240.0050.00416.66
7.4.230.0050.00316.58
7.4.220.0110.01116.80
7.4.210.0090.01216.65
7.4.200.0030.00616.59
7.4.190.0040.00416.83
7.4.160.0120.01016.73
7.4.150.0140.01417.40
7.4.140.0110.00817.86
7.4.130.0120.00816.62
7.4.120.0100.01016.82
7.4.110.0090.01216.57
7.4.100.0090.01316.63
7.4.90.0060.01216.81
7.4.80.0100.01619.39
7.4.70.0070.01616.52
7.4.60.0100.01016.67
7.4.50.0070.01216.61
7.4.40.0050.01616.61
7.4.30.0040.02116.33
7.4.20.0060.01816.75
7.4.10.0150.01216.50
7.4.00.0060.01315.96
7.3.330.0060.00013.35
7.3.320.0020.00213.32
7.3.310.0060.00316.52
7.3.300.0000.00816.61
7.3.290.0000.01516.49
7.3.280.0140.00616.53
7.3.270.0090.01017.40
7.3.260.0090.00916.83
7.3.250.0090.01016.84
7.3.240.0130.01016.67
7.3.230.0040.01716.52
7.3.210.0120.00916.56
7.3.200.0120.00816.57
7.3.190.0110.00916.54
7.3.180.0120.00716.51
7.3.170.0110.01416.43
7.3.160.0130.01316.33
7.3.150.0080.01216.57
7.3.140.0040.02116.42
7.3.130.0260.00316.47
7.3.120.0070.01215.79
7.3.110.0140.00816.71
7.3.100.0310.02616.41
7.3.90.0110.01816.48
7.3.80.0110.01116.61
7.3.70.0110.01416.39
7.3.60.0120.01516.36
7.3.50.0040.01516.58
7.3.40.0160.00716.21
7.3.30.0090.01316.46
7.3.20.0120.01018.19
7.3.10.0100.01018.30
7.3.00.0100.01418.13
7.2.330.0160.01316.89
7.2.320.0130.00716.94
7.2.310.0110.01016.66
7.2.300.0070.01716.54
7.2.290.0120.01016.65
7.2.280.0150.01216.85
7.2.270.0090.01316.68
7.2.260.0130.01216.42
7.2.250.0090.01116.63
7.2.240.0120.00916.67
7.2.230.0100.01516.75
7.2.220.0070.01416.51
7.2.210.0130.01316.59
7.2.200.0110.01016.61
7.2.190.0200.00316.61
7.2.180.0060.01316.61
7.2.170.0000.02016.47
7.2.160.0070.01416.64
7.2.150.0150.00818.30
7.2.140.0050.01818.43
7.2.130.0130.01318.52
7.2.120.0180.00918.55
7.2.110.0030.02018.37
7.2.100.0130.01018.39
7.2.90.0130.00618.48
7.2.80.0100.01117.56
7.2.70.0170.01018.39
7.2.60.0090.00817.84
7.2.50.0100.01718.21
7.2.40.0130.01318.49
7.2.30.0080.01718.53
7.2.20.0120.01218.43
7.2.10.0100.01418.39
7.2.00.0050.01319.06
7.1.330.0170.01717.58
7.1.320.0240.00717.56
7.1.310.0110.02217.69
7.1.300.0200.01317.71
7.1.290.0140.02017.50
7.1.280.0220.01117.62
7.1.270.0180.01017.59
7.1.260.0250.00617.48
7.1.250.0240.00717.52
7.1.240.0250.00817.48
7.1.230.0220.01017.46
7.1.220.0280.00617.43
7.1.210.0240.00817.45
7.1.200.0100.01316.65
7.1.190.0180.01817.49
7.1.180.0260.00617.40
7.1.170.0230.01817.63
7.1.160.0250.00817.51
7.1.150.0160.01717.42
7.1.140.0270.00817.53
7.1.130.0220.01117.62
7.1.120.0290.01317.43
7.1.110.0150.01517.45
7.1.100.0150.01117.74
7.1.90.0260.00917.50
7.1.80.0260.00917.53
7.1.70.0160.00517.28
7.1.60.0170.01318.53
7.1.50.0160.01417.30
7.1.40.0220.00717.61
7.1.30.0210.01117.52
7.1.20.0200.01417.44
7.1.10.0220.01017.57
7.1.00.0160.04219.98
7.0.330.0200.01417.16
7.0.320.0230.00617.03
7.0.310.0140.01617.21
7.0.300.0240.00817.12
7.0.290.0350.00016.96
7.0.280.0180.01117.07
7.0.270.0150.01517.05
7.0.260.0220.01017.07
7.0.250.0180.01417.03
7.0.240.0190.01817.07
7.0.230.0240.00717.09
7.0.220.0100.02017.05
7.0.210.0150.01317.18
7.0.200.0590.01116.11
7.0.190.0160.01217.30
7.0.180.0170.01317.30
7.0.170.0220.00717.32
7.0.160.0200.01017.11
7.0.150.0240.00917.25
7.0.140.0060.04719.74
7.0.130.0280.00617.18
7.0.120.0180.01117.33
7.0.110.0240.00817.19
7.0.100.0190.01317.15
7.0.90.0210.00917.27
7.0.80.0280.00517.17
7.0.70.0290.00617.17
7.0.60.0180.03317.71
7.0.50.0160.03616.67
7.0.40.0510.03217.87
7.0.30.0270.02917.81
7.0.20.0210.03317.88
7.0.10.0160.02817.93
7.0.00.0960.04917.83
5.6.400.0260.00915.88
5.6.390.0300.01016.07
5.6.380.0200.01716.04
5.6.370.0210.01516.27
5.6.360.0280.00815.90
5.6.350.0300.01215.86
5.6.340.0290.01815.99
5.6.330.0200.01716.15
5.6.320.0270.00715.73
5.6.310.0150.01816.10
5.6.300.0170.01516.10
5.6.290.0220.00816.30
5.6.280.0090.04918.41
5.6.270.0230.01016.21
5.6.260.0210.01016.16
5.6.250.0210.01515.95
5.6.240.0180.01315.93
5.6.230.0110.02116.11
5.6.220.0200.01216.10
5.6.210.0180.02718.37
5.6.200.0170.04417.30
5.6.190.0130.02818.38
5.6.180.1740.02718.42
5.6.170.0240.02418.33
5.6.160.0110.04618.26
5.6.150.0130.03017.08
5.6.140.0100.04317.24
5.6.130.0110.02617.16
5.6.120.0150.02518.68
5.6.110.0160.03518.64
5.6.100.0120.03918.63
5.6.90.0160.04718.63
5.6.80.0180.04418.19
5.6.70.0210.00916.00
5.6.60.0170.01416.10
5.6.50.0100.02116.02
5.6.40.0130.01815.95
5.6.30.0180.01116.17
5.6.20.0170.01216.07
5.6.10.0230.00816.20
5.6.00.0300.01116.20
5.5.380.0220.01916.15
5.5.370.0090.02116.06
5.5.360.0110.01916.22
5.5.350.0170.02918.30
5.5.340.0160.04717.10
5.5.330.0180.02418.23
5.5.320.0180.04218.21
5.5.310.0220.05018.28
5.5.300.0160.04317.15
5.5.290.0130.02517.25
5.5.280.0130.03518.61
5.5.270.0100.03118.56
5.5.260.0130.05018.55
5.5.250.0130.03518.23
5.5.240.2140.02818.13
5.5.230.0190.01116.00
5.5.220.0190.01115.97
5.5.210.0120.01815.86
5.5.200.0270.01215.97
5.5.190.0200.00915.76
5.5.180.0150.01915.96
5.5.170.0250.00415.97
5.5.160.0230.01615.83
5.5.150.0240.01015.70
5.5.140.0290.01116.01
5.5.130.0210.01215.97
5.5.120.0220.01016.06
5.5.110.0230.00815.96
5.5.100.0180.01315.82
5.5.90.0240.00515.99
5.5.80.0180.01215.94
5.5.70.0220.00815.75
5.5.60.0210.01416.07
5.5.50.0170.01415.98
5.5.40.0210.00915.91
5.5.30.0180.01215.97
5.5.20.0160.01415.71
5.5.10.0240.00715.80
5.5.00.0200.01016.01
5.4.450.0270.02016.10
5.4.440.0260.03916.04
5.4.430.0300.03015.94
5.4.420.0250.03315.95
5.4.410.0260.03015.92
5.4.400.0250.02215.89
5.4.390.0210.04415.84
5.4.380.0170.04315.89
5.4.370.0300.03215.96
5.4.360.0210.02815.90
5.4.350.0240.02515.93
5.4.340.0190.03315.92
5.4.330.0180.00712.56
5.4.320.0230.04115.96
5.4.310.0290.03415.76
5.4.300.0260.02615.89
5.4.290.0170.04115.91
5.4.280.0230.04315.93
5.4.270.0270.03515.97
5.4.260.0240.03015.93
5.4.250.0510.02815.86
5.4.240.0130.03815.86
5.4.230.0190.03915.85
5.4.220.0170.04415.89
5.4.210.0170.04215.86
5.4.200.0240.02815.88
5.4.190.0210.03915.84
5.4.180.0270.03615.86
5.4.170.0290.03315.90
5.4.160.0240.03715.86
5.4.150.0210.04015.80
5.4.140.0210.03914.54
5.4.130.0210.04314.58
5.4.120.0240.03714.54
5.4.110.0220.03114.50
5.4.100.0160.02514.50
5.4.90.0200.02314.53
5.4.80.0220.03814.65
5.4.70.0370.02514.63
5.4.60.0250.02314.54
5.4.50.0200.02414.68
5.4.40.0190.02814.56
5.4.30.0190.02614.60
5.4.20.0210.02014.60
5.4.10.0240.03614.45
5.4.00.0200.04014.28
5.3.290.0280.03314.11
5.3.280.0230.03814.00
5.3.270.0210.03514.01
5.3.260.0220.03514.01
5.3.250.0220.04214.11
5.3.240.0260.02913.90
5.3.230.0230.02813.96
5.3.220.0410.02413.97
5.3.210.0220.04114.06
5.3.200.0180.03114.00
5.3.190.0220.04914.04
5.3.180.0250.03714.01
5.3.170.0210.04513.91
5.3.160.0220.04013.91
5.3.150.0270.02613.92
5.3.140.0230.04014.03
5.3.130.0190.02813.90
5.3.120.0270.02313.99
5.3.110.0240.04114.05
5.3.100.0200.02313.64
5.3.90.0250.03013.76
5.3.80.0260.02913.59
5.3.70.0180.03213.65
5.3.60.0180.02913.76
5.3.50.0240.03113.56
5.3.40.0230.02513.68
5.3.30.0230.02213.60
5.3.20.0240.01913.63
5.3.10.0210.01713.48
5.3.00.0120.02813.38
5.2.170.0190.02211.77
5.2.160.0170.01911.87
5.2.150.0160.02011.84
5.2.140.0210.02011.66
5.2.130.0100.02211.67
5.2.120.0180.01811.70
5.2.110.0100.02111.75
5.2.100.0120.02711.69
5.2.90.0170.01511.72
5.2.80.0090.02311.66
5.2.70.0100.02211.62
5.2.60.0170.01711.57
5.2.50.0120.02111.71
5.2.40.0120.01911.81
5.2.30.0130.01911.61
5.2.20.0120.02111.48
5.2.10.0110.01911.42
5.2.00.0110.02111.43
5.1.60.0070.02210.99
5.1.50.0080.01811.05
5.1.40.0100.01810.97
5.1.30.0120.01811.20
5.1.20.0130.02011.17
5.1.10.0120.01711.11
5.1.00.0120.02311.06
5.0.50.0100.01310.25
5.0.40.0060.01510.35
5.0.30.0100.01810.12
5.0.20.0110.01210.08
5.0.10.0090.01110.08
5.0.00.0080.02010.15
4.4.90.0070.0099.86
4.4.80.0070.0099.86
4.4.70.0060.0099.86
4.4.60.0060.0099.86
4.4.50.0060.0129.86
4.4.40.0050.0159.86
4.4.30.0050.0099.86
4.4.20.0040.0109.86
4.4.10.0110.0089.86
4.4.00.0020.0189.86
4.3.110.0060.0089.86
4.3.100.0050.0099.86
4.3.90.0030.0129.86
4.3.80.0120.0089.86
4.3.70.0070.0089.86
4.3.60.0050.0119.86
4.3.50.0080.0119.86
4.3.40.0040.0139.86
4.3.30.0050.0099.86
4.3.20.0030.0129.86
4.3.10.0020.0109.86
4.3.00.0020.0129.86

preferences:
43.61 ms | 401 KiB | 5 Q