3v4l.org

run code in 300+ PHP versions simultaneously
<?php function tz_offset_to_name($offset) { $offset *= 3600; // convert hour offset to seconds $abbrarray = timezone_abbreviations_list(); foreach ($abbrarray as $abbr) { foreach ($abbr as $city) { if ($city['offset'] == $offset) { return $city['timezone_id']; } } } return FALSE; } echo tz_offset_to_name("+5:00");

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.0100.00617.23
8.3.50.0110.00821.52
8.3.40.0130.00919.64
8.3.30.0090.00619.32
8.3.20.0040.00420.82
8.3.10.0030.00622.41
8.3.00.0000.00823.60
8.2.180.0060.00917.25
8.2.170.0110.00422.96
8.2.160.0070.00722.31
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0090.00018.38
8.2.110.0030.00720.08
8.2.100.0090.00318.38
8.2.90.0000.00919.80
8.2.80.0000.00818.25
8.2.70.0090.00018.13
8.2.60.0080.00018.79
8.2.50.0030.00618.25
8.2.40.0000.00821.07
8.2.30.0040.00419.90
8.2.20.0040.00418.27
8.2.10.0030.00518.68
8.2.00.0030.00618.75
8.1.280.0140.00725.92
8.1.270.0060.00320.98
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00422.85
8.1.230.0060.00618.41
8.1.220.0040.00418.29
8.1.210.0030.00518.77
8.1.200.0040.00818.10
8.1.190.0040.00417.96
8.1.180.0090.00018.14
8.1.170.0040.00419.41
8.1.160.0080.00022.64
8.1.150.0040.00419.55
8.1.140.0040.00418.20
8.1.130.0040.00418.25
8.1.120.0000.00718.24
8.1.110.0000.00818.09
8.1.100.0040.00418.09
8.1.90.0000.00818.15
8.1.80.0080.00018.16
8.1.70.0070.00018.16
8.1.60.0070.00318.29
8.1.50.0030.00618.14
8.1.40.0000.00818.14
8.1.30.0060.00318.30
8.1.20.0000.00818.32
8.1.10.0030.00618.12
8.1.00.0030.00718.07
8.0.300.0060.00318.77
8.0.290.0070.00017.50
8.0.280.0000.00719.15
8.0.270.0040.00417.98
8.0.260.0030.00317.96
8.0.250.0000.00817.73
8.0.240.0020.00517.76
8.0.230.0080.00317.68
8.0.220.0050.00217.52
8.0.210.0070.00017.49
8.0.200.0000.00817.65
8.0.190.0000.00817.58
8.0.180.0000.00817.67
8.0.170.0090.00017.65
8.0.160.0000.00817.69
8.0.150.0030.00517.53
8.0.140.0080.00017.52
8.0.130.0000.00714.00
8.0.120.0000.00917.54
8.0.110.0080.00017.60
8.0.100.0030.00517.64
8.0.90.0000.00817.62
8.0.80.0030.01417.58
8.0.70.0000.00817.68
8.0.60.0030.00517.66
8.0.50.0040.00417.59
8.0.30.0100.00817.75
8.0.20.0140.00717.65
8.0.10.0030.00517.88
8.0.00.0080.01017.47
7.4.330.0060.00015.08
7.4.320.0000.00617.24
7.4.300.0030.00317.27
7.4.290.0080.00417.18
7.4.280.0040.00417.16
7.4.270.0040.00417.24
7.4.260.0000.00717.08
7.4.250.0000.00817.15
7.4.240.0000.00817.26
7.4.230.0080.00016.92
7.4.220.0170.00017.27
7.4.210.0050.01317.27
7.4.200.0050.00317.27
7.4.160.0070.01517.26
7.4.150.0120.00917.40
7.4.140.0120.01217.86
7.4.130.0130.00817.22
7.4.120.0100.00917.38
7.4.110.0120.00917.40
7.4.100.0100.01317.27
7.4.90.0140.00317.11
7.4.80.0070.01119.39
7.4.70.0070.01117.27
7.4.60.0090.00917.08
7.4.50.0080.00017.11
7.4.40.0060.01217.21
7.4.30.0160.01017.43
7.4.00.0030.01415.70
7.3.330.0060.00013.88
7.3.320.0060.00313.92
7.3.310.0030.00617.08
7.3.300.0040.00416.97
7.3.290.0030.00317.00
7.3.280.0110.01017.03
7.3.270.0130.01317.40
7.3.260.0040.01517.31
7.3.250.0140.00617.13
7.3.240.0120.00617.20
7.3.230.0100.01017.14
7.3.210.0140.01117.08
7.3.200.0080.01417.24
7.3.190.0070.01317.25
7.3.180.0100.00717.07
7.3.170.0090.01317.23
7.3.160.0030.01617.18
7.3.120.0130.00715.60
7.3.110.0130.00315.58
7.3.100.0120.00615.49
7.3.90.0040.00815.55
7.3.80.0090.00915.58
7.3.70.0100.01015.20
7.3.60.0060.00915.40
7.3.50.0060.00915.55
7.3.40.0090.00915.61
7.3.30.0030.01315.24
7.3.20.0040.01116.88
7.3.10.0060.01216.71
7.3.00.0050.00516.84
7.2.330.0070.01117.55
7.2.320.0090.00917.40
7.2.310.0070.01117.43
7.2.300.0170.01017.44
7.2.290.0040.01517.24
7.2.250.0070.01115.77
7.2.240.0070.01415.59
7.2.230.0060.00915.84
7.2.220.0170.00015.67
7.2.210.0030.01015.59
7.2.200.0120.00615.70
7.2.190.0070.00715.82
7.2.180.0080.00415.86
7.2.170.0040.01515.82
7.2.60.0030.01017.14
7.2.00.0030.01019.64
7.1.330.0000.01815.50
7.1.320.0070.00415.91
7.1.310.0110.00615.87
7.1.300.0070.00715.94
7.1.290.0030.01015.57
7.1.280.0030.01315.88
7.1.270.0070.01015.62
7.1.260.0070.01015.68
7.1.200.0060.00915.46
7.1.100.0060.00618.16
7.1.70.0030.00717.04
7.1.60.0200.00719.18
7.1.50.0070.01117.13
7.1.00.0070.07322.34
7.0.200.0080.00316.92
7.0.60.0030.04320.95
7.0.50.0030.07718.95
7.0.40.0030.08720.25
7.0.30.0300.07720.10
7.0.20.0170.06320.24
7.0.10.0100.08320.24
7.0.00.0100.08320.23
5.6.280.0000.08022.36
5.6.210.0070.08021.89
5.6.200.0100.07719.47
5.6.190.0170.03721.67
5.6.180.0470.07021.75
5.6.170.0300.04021.68
5.6.160.0070.05321.70
5.6.150.0030.04319.45
5.6.140.0100.06019.38
5.6.130.0100.07019.45
5.6.120.0130.03322.16
5.6.110.0100.07722.40
5.6.100.0030.07022.40
5.6.90.0030.06322.36
5.6.80.0130.07321.66
5.5.350.0130.03321.68
5.5.340.0030.06319.23
5.5.330.0100.08721.45
5.5.320.0170.05021.42
5.5.310.0330.08321.48
5.5.300.0030.07319.31
5.5.290.0100.07319.08
5.5.280.0030.06322.14
5.5.270.0100.06322.11
5.5.260.0070.08722.16
5.5.250.0070.09021.89
5.5.240.0300.07721.65
5.4.450.0730.06021.17
5.4.440.0800.05321.16
5.4.430.0900.04320.66
5.4.420.0700.04720.64
5.4.410.0770.05320.55
5.4.400.0600.05720.63
5.4.390.0600.06320.53
5.4.380.0770.04320.77
5.4.370.0670.05020.71
5.4.360.0630.06020.59
5.4.350.0730.05320.56
5.4.340.0800.05320.84
5.4.320.0870.04720.72
5.4.310.0800.04720.57
5.4.300.0700.05720.85
5.4.290.0770.05020.46
5.4.280.0830.05720.61
5.4.270.0700.05720.59
5.4.260.0830.04320.48
5.4.250.0700.05720.52
5.4.240.0670.05320.32
5.4.230.0830.05020.65
5.4.220.0630.06320.58
5.4.210.0930.04320.54
5.4.200.0670.05318.14
5.4.190.0670.06020.53
5.4.180.0630.05720.50
5.4.170.0730.05020.75
5.4.160.0930.06720.75
5.4.150.0700.05020.52
5.4.140.0800.06018.04
5.4.130.0770.06018.04
5.4.120.0830.05317.84
5.4.110.1030.04318.23
5.4.100.0630.05318.08
5.4.90.0600.05718.09
5.4.80.0870.04317.85
5.4.70.0770.04717.92
5.4.60.0900.04717.98
5.4.50.0830.04317.90
5.4.40.0770.04717.82
5.4.30.0700.05018.18
5.4.20.0730.05317.80
5.4.10.0800.04318.20
5.4.00.0730.05017.35
5.3.290.0700.05016.29
5.3.280.0600.06015.92
5.3.270.0800.05316.02
5.3.260.0830.06715.93
5.3.250.0730.05015.95
5.3.240.0730.05016.24
5.3.230.0900.05316.09
5.3.220.0830.05015.88
5.3.210.0670.06016.00
5.3.200.0870.05015.91
5.3.190.0770.05316.05
5.3.180.0930.03715.98
5.3.170.0870.04715.95
5.3.160.0800.06015.98
5.3.150.0570.05715.99
5.3.140.0600.06016.05
5.3.130.0770.05315.98
5.3.120.0730.05715.86
5.3.110.0670.05315.97
5.3.100.0670.05015.32
5.3.90.0700.04315.45
5.3.80.0770.04315.45
5.3.70.0570.06015.36
5.3.60.0830.06015.28
5.3.50.0630.05315.51
5.3.40.0700.04715.67
5.3.30.0700.05315.48
5.3.20.0530.05714.99
5.3.10.0630.04715.00
5.3.00.0730.05014.63
5.2.170.0530.04312.36
5.2.160.0500.04312.46
5.2.150.0700.04312.34
5.2.140.0670.04712.50
5.2.130.0630.04012.07
5.2.120.0730.03712.14
5.2.110.0570.03712.07
5.2.100.0330.04712.34
5.2.90.0100.04312.05
5.2.80.0030.04712.00
5.2.70.0000.05012.20
5.2.60.0570.04712.09
5.2.50.0430.05312.01
5.2.40.0430.04011.95
5.2.30.0500.04312.09
5.2.20.0470.04711.99
5.2.10.0370.04711.88
5.2.00.0070.04311.82
5.1.60.0030.03310.52
5.1.50.0130.02710.52
5.1.40.0030.03710.52
5.1.30.0330.03310.52
5.1.20.0400.03310.52
5.1.10.0330.03710.52
5.1.00.0030.03710.52
5.0.50.0100.02310.52
5.0.40.0070.02310.52
5.0.30.0030.04310.52
5.0.20.0200.03010.52
5.0.10.0130.04310.52
5.0.00.0170.04010.52
4.4.90.0270.01310.52
4.4.80.0230.01710.52
4.4.70.0200.02010.52
4.4.60.0200.02310.52
4.4.50.0230.02010.52
4.4.40.0230.03010.52
4.4.30.0170.02310.52
4.4.20.0270.02010.52
4.4.10.0230.02010.52
4.4.00.0230.03310.52
4.3.110.0230.02010.52
4.3.100.0170.02310.52
4.3.90.0130.02710.52
4.3.80.0270.04010.52
4.3.70.0170.02010.52
4.3.60.0170.02310.52
4.3.50.0200.02310.52
4.3.40.0270.03010.52
4.3.30.0130.02010.52
4.3.20.0100.02310.52
4.3.10.0070.02310.52
4.3.00.0130.0237.09

preferences:
59.71 ms | 401 KiB | 5 Q