3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getEmojiFlag(string $countryCode): string { $regionalOffset = 0x1F1A5; return mb_chr($regionalOffset + mb_ord($countryCode[0], 'UTF-8'), 'UTF-8') . mb_chr($regionalOffset + mb_ord($countryCode[1], 'UTF-8'), 'UTF-8'); } echo getEmojiFlag('DZ');

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.5.10.0090.00818.87
8.5.00.0140.00719.99
8.4.150.0020.00014.05
8.4.140.0090.01217.73
8.4.130.0140.00717.64
8.4.120.0150.00620.59
8.4.110.0120.00522.32
8.4.100.0280.00717.59
8.4.90.0250.00817.71
8.4.80.0150.00718.00
8.4.70.0200.00617.72
8.4.60.0210.00817.37
8.4.50.0220.00817.99
8.4.40.0220.00817.48
8.4.30.0220.00518.41
8.4.20.0210.00617.62
8.4.10.0200.00518.23
8.3.280.0130.00818.30
8.3.270.0090.01016.63
8.3.260.0120.00716.29
8.3.250.0140.00218.88
8.3.240.0090.00916.55
8.3.230.0230.00716.40
8.3.220.0160.00816.82
8.3.210.0200.00816.63
8.3.200.0160.00416.52
8.3.190.0170.00516.33
8.3.180.0130.00316.43
8.3.170.0180.00517.37
8.3.160.0190.00217.87
8.3.150.0170.00416.84
8.3.140.0170.00417.91
8.3.130.0180.00716.48
8.3.120.0180.00617.38
8.3.110.0150.00617.92
8.3.100.0130.00616.38
8.3.90.0150.00319.93
8.3.80.0160.00517.27
8.3.70.0160.00716.39
8.3.60.0180.00516.45
8.3.50.0170.00417.66
8.3.40.0140.00617.88
8.3.30.0120.00817.75
8.3.20.0160.00519.68
8.3.10.0120.00419.87
8.3.00.0120.00720.30
8.2.290.0180.00618.31
8.2.280.0170.00817.11
8.2.270.0210.00617.32
8.2.260.0200.00516.58
8.2.250.0180.00616.45
8.2.240.0150.00417.18
8.2.230.0120.00318.31
8.2.220.0180.00418.97
8.2.210.0140.00519.78
8.2.200.0160.00716.65
8.2.190.0220.00616.43
8.2.180.0180.00719.57
8.2.170.0210.00618.09
8.2.160.0190.00719.35
8.2.150.0170.00420.27
8.2.140.0130.00419.88
8.2.130.0130.00320.39
8.2.120.0140.00520.37
8.2.110.0100.00718.68
8.2.100.0130.00417.59
8.2.90.0120.00417.76
8.2.80.0140.00518.06
8.2.70.0180.00517.52
8.2.60.0170.00717.43
8.2.50.0170.00417.60
8.2.40.0170.00517.81
8.2.30.0150.00317.89
8.2.20.0100.00718.21
8.2.10.0140.00517.71
8.2.00.0110.00518.03
8.1.330.0200.00916.38
8.1.320.0170.00416.19
8.1.310.0180.00616.31
8.1.300.0230.00717.24
8.1.290.0180.00521.13
8.1.280.0180.01019.39
8.1.270.0150.00619.59
8.1.260.0120.00420.30
8.1.250.0140.00221.04
8.1.240.0130.00318.54
8.1.230.0140.00318.44
8.1.220.0090.00617.30
8.1.210.0160.00717.75
8.1.200.0140.00517.19
8.1.190.0160.00617.09
8.1.180.0180.00517.39
8.1.170.0100.00717.64
8.1.160.0140.00417.73
8.1.150.0120.00617.76
8.1.140.0120.00717.59
8.1.130.0130.00517.62
8.1.120.0120.00617.63
8.1.110.0110.00517.67
8.1.100.0130.00517.68
8.1.90.0120.00617.61
8.1.80.0130.00517.59
8.1.70.0130.00517.62
8.1.60.0140.00517.67
8.1.50.0120.00517.64
8.1.40.0140.00517.71
8.1.30.0120.00617.72
8.1.20.0130.00617.76
8.1.10.0130.00717.63
8.1.00.0150.00417.56
8.0.300.0170.00417.79
8.0.290.0210.00416.61
8.0.280.0150.00417.33
8.0.270.0170.00317.23
8.0.260.0140.00417.20
8.0.250.0120.00517.25
8.0.240.0100.00617.20
8.0.230.0130.00317.24
8.0.220.0100.00717.12
8.0.210.0120.00417.12
8.0.200.0110.00417.11
8.0.190.0100.00517.19
8.0.180.0120.00417.16
8.0.170.0100.00517.20
8.0.160.0120.00417.19
8.0.150.0120.00317.02
8.0.140.0130.00517.04
8.0.130.0110.00617.03
8.0.120.0110.00617.09
8.0.110.0120.00517.04
8.0.100.0110.00517.10
8.0.90.0120.00517.07
8.0.80.0130.00517.04
8.0.70.0120.00517.01
8.0.60.0110.00517.08
8.0.50.0120.00517.05
8.0.30.0120.00517.03
8.0.20.0110.00417.23
8.0.10.0110.00517.13
7.4.330.0120.00416.76
7.4.320.0110.00517.00
7.4.300.0110.00516.99
7.4.290.0130.00516.98
7.4.280.0130.00416.97
7.4.270.0130.00416.81
7.4.260.0140.00416.87
7.4.250.0130.00516.81
7.4.240.0120.00516.83
7.4.230.0110.00616.87
7.4.220.0130.00416.85
7.4.210.0110.00516.88
7.4.200.0120.00416.84
7.4.190.0130.00416.90
7.4.180.0120.00516.90
7.4.160.0130.00316.92
7.4.150.0130.00416.83
7.4.140.0140.00316.79
7.4.130.0130.00416.81
7.4.120.0110.00516.82
7.4.110.0120.00516.82
7.4.100.0120.00516.82
7.4.90.0120.00516.82
7.4.80.0140.00416.81
7.4.70.0130.00416.82
7.4.60.0130.00516.81
7.4.50.0120.00516.79
7.4.40.0130.00416.78
7.4.30.0130.00416.83
7.4.20.0130.00416.79
7.4.10.0140.00316.81
7.4.00.0110.00516.84

preferences:
86.34 ms | 403 KiB | 5 Q