3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = '£¥$@"\'.,;:_-=+*#%&<>?!¿¡§¤()ÄÖÑÜÉÅßÇÆΦΓΔΛΩΣΠΨΘØΞñüäòøàæåèéöùì{}[]|~^€'; $characters = array( 'Δ'=>'0xD0', 'Φ'=>'0xDE', 'Γ'=>'0xAC', 'Λ'=>'0xC2', 'Ω'=>'0xDB', 'Π'=>'0xBA', 'Ψ'=>'0xDD', 'Σ'=>'0xCA', 'Θ'=>'0xD4', 'Ξ'=>'0xB1', '¡'=>'0xA1', '£'=>'0xA3', '¤'=>'0xA4', '¥'=>'0xA5', '§'=>'0xA7', '¿'=>'0xBF', 'Ä'=>'0xC4', 'Å'=>'0xC5', 'Æ'=>'0xC6', 'Ç'=>'0xC7', 'É'=>'0xC9', 'Ñ'=>'0xD1', 'Ö'=>'0xD6', 'Ø'=>'0xD8', 'Ü'=>'0xDC', 'ß'=>'0xDF', 'à'=>'0xE0', 'ä'=>'0xE4', 'å'=>'0xE5', 'æ'=>'0xE6', 'è'=>'0xE8', 'é'=>'0xE9', 'ì'=>'0xEC', 'ñ'=>'0xF1', 'ò'=>'0xF2', 'ö'=>'0xF6', 'ø'=>'0xF8', 'ù'=>'0xF9', 'ü'=>'0xFC', ); $message = ''; if(mb_detect_encoding($body, 'UTF-8') != 'UTF-8') { $body = utf8_encode($body); } for ($i = 0; $i < mb_strlen($body, 'UTF-8'); $i++) { $c = mb_substr($body, $i, 1, 'UTF-8'); if (isset($characters[$c])) { $message .= chr(hex2dec($characters[$c])); } else { $message .= $c; } } echo $message;

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.4.20.0090.00017.87
8.4.10.0090.00019.97
8.3.150.0040.01418.79
8.3.140.0080.00016.90
8.3.130.0100.00018.74
8.3.120.0040.00418.94
8.3.110.0030.00616.63
8.3.100.0030.00618.43
8.3.90.0040.00418.79
8.3.80.0040.00718.43
8.3.70.0080.00816.88
8.3.60.0140.00016.88
8.3.50.0180.00221.06
8.3.40.0060.00918.73
8.3.30.0080.00618.84
8.3.20.0040.00420.34
8.3.10.0000.00823.51
8.3.00.0030.00622.40
8.2.260.0030.00616.50
8.2.250.0040.01116.92
8.2.240.0110.00917.22
8.2.230.0090.00020.94
8.2.220.0070.01337.54
8.2.210.0040.01126.77
8.2.200.0080.00816.88
8.2.190.0070.00718.54
8.2.180.0090.00618.54
8.2.170.0060.00922.96
8.2.160.0100.00719.46
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00422.14
8.2.120.0040.00426.35
8.2.110.0000.00920.99
8.2.100.0090.00317.72
8.2.90.0050.00317.84
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0040.00717.92
8.2.50.0040.00418.07
8.2.40.0060.00318.16
8.2.30.0000.00818.01
8.2.20.0000.00717.76
8.2.10.0070.00018.12
8.2.00.0000.00817.82
8.1.310.0060.01616.66
8.1.300.0080.00018.35
8.1.290.0070.00318.88
8.1.280.0150.00625.92
8.1.270.0040.00423.84
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0110.00022.50
8.1.230.0040.00820.95
8.1.220.0000.00817.74
8.1.210.0080.00018.89
8.1.200.0060.00317.22
8.1.190.0040.00417.10
8.1.180.0060.00318.10
8.1.170.0030.00718.63
8.1.160.0040.00418.98
8.1.150.0000.00718.99
8.1.140.0110.00019.54
8.1.130.0000.00717.75
8.1.120.0000.00717.52
8.1.110.0040.00417.43
8.1.100.0000.00817.50
8.1.90.0070.00017.58
8.1.80.0000.00717.51
8.1.70.0050.00317.47
8.1.60.0040.00417.68
8.1.50.0000.00817.49
8.1.40.0030.00617.57
8.1.30.0040.00417.79
8.1.20.0040.00417.71
8.1.10.0030.00517.52
8.1.00.0030.00517.55
8.0.300.0000.00720.06
8.0.290.0070.00016.75
8.0.280.0030.00318.41
8.0.270.0000.00717.28
8.0.260.0030.00317.41
8.0.250.0030.00317.05
8.0.240.0030.00317.11
8.0.230.0000.00717.04
8.0.220.0000.00616.94
8.0.210.0050.00216.97
8.0.200.0030.00316.95
8.0.190.0000.00817.06
8.0.180.0050.00317.05
8.0.170.0040.00416.84
8.0.160.0080.00016.98
8.0.150.0060.00316.94
8.0.140.0040.00417.00
8.0.130.0060.00013.40
8.0.120.0040.00416.82
8.0.110.0040.00416.88
8.0.100.0040.00417.02
8.0.90.0040.00417.02
8.0.80.0060.01617.04
8.0.70.0000.00716.96
8.0.60.0080.00016.85
8.0.50.0000.00716.99
8.0.30.0090.01117.08
8.0.20.0130.00917.43
8.0.10.0070.00017.05
8.0.00.0280.01716.69
7.4.330.0000.00515.08
7.4.320.0000.00716.60
7.4.300.0030.00316.59
7.4.290.0040.00416.69
7.4.280.0070.00016.56
7.4.270.0030.00316.66
7.4.260.0000.00716.50
7.4.250.0000.00816.44
7.4.240.0090.00016.42
7.4.230.0070.00016.63
7.4.220.0090.00916.63
7.4.210.0110.00416.63
7.4.200.0040.00416.48
7.4.160.0080.00816.46
7.4.150.0110.00517.40
7.4.140.0070.01017.86
7.4.130.0110.00716.50
7.4.120.0090.00916.53
7.4.110.0100.00716.46
7.4.100.0090.00916.70
7.4.90.0130.00616.65
7.4.80.0030.01919.39
7.4.70.0130.00316.64
7.4.60.0100.00716.62
7.4.50.0070.01016.44
7.4.40.0160.00316.43
7.4.30.0080.00916.42
7.4.00.0100.00315.13
7.3.330.0000.00813.25
7.3.320.0050.00013.16
7.3.310.0040.00416.46
7.3.300.0030.00316.36
7.3.290.0050.00916.41
7.3.280.0090.00816.40
7.3.270.0110.00517.40
7.3.260.0190.00416.56
7.3.250.0080.01116.49
7.3.240.0060.01416.48
7.3.230.0070.01016.56
7.3.210.0100.00716.62
7.3.200.0140.00316.38
7.3.190.0110.00916.48
7.3.180.0180.00316.43
7.3.170.0070.01016.56
7.3.160.0160.00016.67
7.2.330.0110.00616.51
7.2.320.0150.00916.43
7.2.310.0090.01216.64
7.2.300.0130.01016.51
7.2.290.0100.01016.54
7.2.60.0030.01017.09
7.2.00.0070.00719.13
7.1.200.0070.00415.59
7.1.100.0040.00818.14
7.1.70.0000.00817.25
7.1.60.0030.01017.45
7.1.50.0260.01034.98
7.1.00.0000.08022.45
7.0.200.0130.00014.73
7.0.100.0270.06720.05
7.0.90.0300.06320.02
7.0.80.0270.05719.99
7.0.70.0300.07719.97
7.0.60.0230.06020.01
7.0.50.0300.06320.25
7.0.40.0330.06320.24
7.0.30.0330.05720.36
7.0.20.0330.05720.21
7.0.10.0370.06020.40
7.0.00.0430.07020.44
5.6.250.0170.05020.55
5.6.240.0070.06320.68
5.6.230.0100.05720.75
5.6.220.0100.05320.62
5.6.210.0130.05320.60
5.6.200.0170.07021.13
5.6.190.0170.05021.15
5.6.180.0100.06021.13
5.6.170.0130.05721.07
5.6.160.0170.05321.12
5.6.150.0230.06021.10
5.6.140.0070.05721.09
5.6.130.0170.05021.16
5.6.120.0070.06021.11
5.6.110.0070.06021.09
5.6.100.0070.05721.07
5.6.90.0070.06321.08
5.6.80.0000.06020.42
5.6.70.0070.05720.46
5.6.60.0100.05320.48
5.6.50.0070.05720.59
5.6.40.0070.05720.50
5.6.30.0170.04720.55
5.6.20.0030.05720.45
5.6.10.0100.05720.54
5.6.00.0070.06020.38

preferences:
70.55 ms | 403 KiB | 5 Q