3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getFormattedDateTime($date, $timezone) { $datetime = DateTimeImmutable::createFromFormat( 'Y-m-d H:i:s', $date, new DateTimeZone( $timezone ) ); $rfc3339 = $datetime->format( DATE_RFC3339 ); var_dump($rfc3339); } $timezones = [ 'UTC', 'America/Regina', 'Europe/Kiev', ]; $date = '1970-01-01 00:00:00'; foreach ($timezones as $timezone) { getFormattedDateTime($date, $timezone); } $date = '2022-08-29 12:00:00'; foreach ($timezones as $timezone) { getFormattedDateTime($date, $timezone); }

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.0070.01417.89
8.4.10.0030.00623.74
8.3.150.0040.00417.35
8.3.140.0090.00017.39
8.3.130.0050.00318.71
8.3.120.0150.00318.79
8.3.110.0050.00520.94
8.3.100.0080.00424.06
8.3.90.0030.00526.77
8.3.80.0030.00616.75
8.3.70.0090.00616.88
8.3.60.0150.00016.75
8.3.50.0120.00918.50
8.3.40.0140.00720.43
8.3.30.0090.00618.96
8.3.20.0000.00924.18
8.3.10.0040.00424.66
8.3.00.0000.00926.16
8.2.260.0050.00316.70
8.2.250.0040.00417.03
8.2.240.0070.01019.07
8.2.230.0090.00022.58
8.2.220.0060.00637.54
8.2.210.0080.00626.77
8.2.200.0090.00317.00
8.2.190.0150.00017.00
8.2.180.0090.00625.92
8.2.170.0140.00722.96
8.2.160.0000.01422.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00619.80
8.2.110.0000.01021.11
8.2.100.0070.00418.16
8.2.90.0060.00317.91
8.2.80.0050.00319.11
8.2.70.0050.00317.88
8.2.60.0000.00917.88
8.2.50.0080.00019.48
8.2.40.0050.00319.48
8.2.30.0000.00718.20
8.2.20.0000.00719.44
8.2.10.0000.00818.26
8.2.00.0040.00419.40
8.1.310.0060.00918.41
8.1.300.0130.00719.60
8.1.290.0040.00818.88
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.08
8.1.230.0080.00421.00
8.1.220.0050.00317.91
8.1.210.0000.00918.79
8.1.200.0050.00517.48
8.1.190.0000.00817.60
8.1.180.0090.00018.10
8.1.170.0060.00317.62
8.1.160.0040.00419.22
8.1.150.0000.00718.76
8.1.140.0050.00217.65
8.1.130.0070.00019.07
8.1.120.0030.00517.59
8.1.110.0040.00417.64
8.1.100.0070.00017.55
8.1.90.0030.00717.63
8.1.80.0100.00517.56
8.1.70.0090.00817.63
8.1.60.0160.00317.71
8.1.50.0130.00617.63
8.1.40.0080.01017.66
8.1.30.0170.00317.74
8.1.20.0130.00217.79
8.1.10.0130.00517.54
8.1.00.0120.00617.52
8.0.300.0020.00520.23
8.0.290.0000.00717.00
8.0.280.0080.00018.59
8.0.270.0040.00417.00
8.0.260.0000.00718.55
8.0.250.0040.00417.19
8.0.240.0000.00817.20
8.0.230.0080.00017.09
8.0.220.0110.00317.07
8.0.210.0140.00217.15
8.0.200.0100.00517.15
8.0.190.0100.00617.17
8.0.180.0120.00417.07
8.0.170.0110.00417.03
8.0.160.0110.00417.14
8.0.150.0060.00916.99
8.0.140.0100.00517.05
8.0.130.0100.00617.15
8.0.120.0100.00517.08
8.0.110.0080.00717.07
8.0.100.0120.00317.07
8.0.90.0090.00517.10
8.0.80.0140.00117.09
8.0.70.0120.00317.09
8.0.60.0080.00617.12
8.0.50.0130.00217.10
8.0.30.0080.00617.13
8.0.20.0140.00117.02
8.0.10.0150.00117.15
8.0.00.0060.00817.26
7.4.330.0020.00215.55
7.4.320.0030.00316.74
7.4.300.0060.00616.64
7.4.290.0130.00316.65
7.4.280.0140.00316.69
7.4.270.0110.00416.74
7.4.260.0090.00616.64
7.4.250.0080.00616.75
7.4.240.0120.00416.62
7.4.230.0180.00016.51
7.4.220.0130.00316.62
7.4.210.0130.00216.50
7.4.200.0120.00416.66
7.4.190.0110.00416.79
7.4.180.0120.00316.73
7.4.160.0100.00516.76
7.4.150.0110.00516.60
7.4.140.0140.00216.54
7.4.130.0060.00816.56
7.4.120.0080.00716.58
7.4.110.0090.00516.65
7.4.100.0120.00416.66
7.4.90.0110.00516.59
7.4.80.0110.00316.46
7.4.70.0100.00416.58
7.4.60.0110.00416.47
7.4.50.0130.00216.63
7.4.40.0120.00316.39
7.4.30.0130.00116.51
7.4.20.0120.00416.57
7.4.10.0090.00316.42
7.4.00.0050.00516.58
7.3.330.0110.00516.34
7.3.320.0120.00416.59
7.3.310.0140.00316.54
7.3.300.0140.00416.59
7.3.290.0110.00416.59
7.3.280.0110.00516.51
7.3.270.0120.00416.66
7.3.260.0130.00316.50
7.3.250.0110.00516.51
7.3.240.0100.00616.61
7.3.230.0100.00716.46
7.3.220.0110.00516.46
7.3.210.0110.00616.48
7.3.200.0100.00716.54
7.3.190.0130.00416.58
7.3.180.0130.00416.47
7.3.170.0120.00516.49
7.3.160.0150.00216.43
7.3.150.0140.00216.56
7.3.140.0140.00316.45
7.3.130.0080.00816.38
7.3.120.0100.00616.44
7.3.110.0100.00716.37
7.3.100.0100.00516.30
7.3.90.0050.00816.57
7.3.80.0110.00516.27
7.3.70.0130.00416.53
7.3.60.0140.00216.46
7.3.50.0100.00416.52
7.3.40.0090.00616.48
7.3.30.0090.00616.48
7.3.20.0130.00218.37
7.3.10.0120.00618.38
7.3.00.0100.00718.36
7.2.340.0100.00616.57
7.2.330.0080.00816.53
7.2.320.0110.00516.63
7.2.310.0120.00416.68
7.2.300.0110.00516.71
7.2.290.0140.00116.54
7.2.280.0080.00816.65
7.2.270.0110.00516.56
7.2.260.0100.00616.60
7.2.250.0060.00916.66
7.2.240.0080.00716.52
7.2.230.0150.00116.65
7.2.220.0120.00416.57
7.2.210.0080.00716.52
7.2.200.0150.00316.86
7.2.190.0100.00616.76
7.2.180.0080.00716.81
7.2.170.0130.00316.78
7.2.160.0110.00416.78
7.2.150.0100.00718.79
7.2.140.0080.00818.60
7.2.130.0110.00518.73
7.2.120.0110.00418.73
7.2.110.0120.00518.69
7.2.100.0120.00418.85
7.2.90.0120.00518.81
7.2.80.0130.00418.68
7.2.70.0130.00418.77
7.2.60.0150.00118.60
7.2.50.0090.00618.80
7.2.40.0120.00518.69
7.2.30.0140.00218.61
7.2.20.0100.00718.85
7.2.10.0090.00918.88
7.2.00.0070.01018.88
7.1.330.0140.00117.55
7.1.320.0060.01017.61
7.1.310.0090.00717.58
7.1.300.0120.00317.41
7.1.290.0130.00417.48
7.1.280.0080.00817.52
7.1.270.0120.00217.46
7.1.260.0070.00617.59
7.1.250.0090.00517.37
7.1.240.0100.00417.50
7.1.230.0140.00217.50
7.1.220.0110.00417.50
7.1.210.0110.00517.56
7.1.200.0120.00217.59
7.1.190.0150.00017.43
7.1.180.0140.00117.41
7.1.170.0120.00417.43
7.1.160.0110.00517.54
7.1.150.0050.01017.44
7.1.140.0130.00217.33
7.1.130.0090.00717.45
7.1.120.0110.00417.49
7.1.110.0120.00317.46
7.1.100.0140.00117.42
7.1.90.0100.00517.54
7.1.80.0100.00517.35
7.1.70.0120.00317.32
7.1.60.0110.00517.55
7.1.50.0090.00717.45
7.1.40.0110.00517.42
7.1.30.0100.00517.52
7.1.20.0120.00417.42
7.1.10.0150.00017.39
7.1.00.0140.00117.51
7.0.330.0120.00317.00
7.0.320.0050.01017.08
7.0.310.0090.00617.04
7.0.300.0100.00617.23
7.0.290.0100.00417.20
7.0.280.0070.00717.13
7.0.270.0110.00417.14
7.0.260.0050.01017.09
7.0.250.0110.00417.30
7.0.240.0100.00417.50
7.0.230.0160.00017.52
7.0.220.0110.00417.37
7.0.210.0100.00517.47
7.0.200.0100.00617.33
7.0.190.0130.00217.44
7.0.180.0090.00617.39
7.0.170.0110.00417.35
7.0.160.0070.00717.27
7.0.150.0090.00617.26
7.0.140.0140.00217.21
7.0.130.0120.00417.36
7.0.120.0110.00417.33
7.0.110.0140.00217.33
7.0.100.0080.00717.36
7.0.90.0100.00517.27
7.0.80.0130.00217.22
7.0.70.0110.00517.20
7.0.60.0110.00517.21
7.0.50.0080.00717.19
7.0.40.0120.00417.27
7.0.30.0110.00317.19
7.0.20.0120.00317.26
7.0.10.0060.00817.32
7.0.00.0140.00117.26
5.6.400.0100.00516.03
5.6.390.0130.00216.07
5.6.380.0090.00716.01
5.6.370.0040.01116.06
5.6.360.0100.00516.00
5.6.350.0100.00515.89
5.6.340.0150.00116.05
5.6.330.0140.00116.04
5.6.320.0070.00716.00
5.6.310.0090.00616.10
5.6.300.0110.00515.85
5.6.290.0090.00616.10
5.6.280.0120.00215.96
5.6.270.0130.00216.01
5.6.260.0070.00715.95
5.6.250.0070.00615.83
5.6.240.0110.00415.98
5.6.230.0130.00216.12
5.6.220.0100.00516.13
5.6.210.0060.00816.14
5.6.200.0130.00116.10
5.6.190.0100.00516.18
5.6.180.0140.00116.12
5.6.170.0110.00416.26
5.6.160.0140.00016.15
5.6.150.0090.00616.14
5.6.140.0090.00516.02
5.6.130.0090.00516.03
5.6.120.0090.00516.09
5.6.110.0130.00216.02
5.6.100.0090.00516.09
5.6.90.0140.00016.18
5.6.80.0060.00716.10
5.6.70.0110.00316.16
5.6.60.0110.00316.19
5.6.50.0090.00415.97
5.6.40.0090.00516.03
5.6.30.0080.00616.03
5.6.20.0140.00015.92
5.6.10.0040.00915.96
5.6.00.0080.00616.09
5.5.380.0130.00216.09
5.5.370.0080.00615.96
5.5.360.0110.00315.92
5.5.350.0100.00516.12
5.5.340.0160.00015.82
5.5.330.0110.00415.94
5.5.320.0090.00515.97
5.5.310.0090.00615.95
5.5.300.0080.00615.99
5.5.290.0130.00115.87
5.5.280.0110.00415.92
5.5.270.0070.00715.99
5.5.260.0080.00615.76
5.5.250.0080.00616.11
5.5.240.0060.00916.10
5.5.230.0130.00116.00
5.5.220.0120.00215.91
5.5.210.0090.00316.13
5.5.200.0080.00615.76
5.5.190.0050.00815.92
5.5.180.0100.00415.99
5.5.170.0100.00315.85
5.5.160.0100.00315.97
5.5.150.0100.00315.82
5.5.140.0100.00315.86
5.5.130.0090.00315.82
5.5.120.0090.00415.78
5.5.110.0100.00415.77
5.5.100.0130.00016.13
5.5.90.0110.00416.00
5.5.80.0110.00316.03
5.5.70.0130.00016.05
5.5.60.0090.00616.12
5.5.50.0130.00215.94
5.5.40.0090.00515.91
5.5.30.0100.00416.01
5.5.20.0110.00316.06
5.5.10.0140.00016.05
5.5.00.0110.00215.93
5.4.450.0080.00312.64
5.4.440.0110.00012.72
5.4.430.0020.00812.68
5.4.420.0060.00512.54
5.4.410.0110.00012.65
5.4.400.0050.00712.51
5.4.390.0050.00612.63
5.4.380.0100.00112.69
5.4.370.0090.00212.63
5.4.360.0100.00112.53
5.4.350.0090.00112.67
5.4.340.0100.00012.41
5.4.330.0080.00312.67
5.4.320.0100.00112.74
5.4.310.0050.00712.48
5.4.300.0080.00412.67
5.4.290.0070.00412.70
5.4.280.0090.00212.67
5.4.270.0100.00112.65
5.4.260.0040.00712.70
5.4.250.0070.00512.50
5.4.240.0060.00512.64
5.4.230.0060.00612.41
5.4.220.0110.00012.44
5.4.210.0070.00412.34
5.4.200.0080.00312.27
5.4.190.0110.00012.45
5.4.180.0100.00212.35
5.4.170.0070.00412.56
5.4.160.0100.00012.62
5.4.150.0070.00312.55
5.4.140.0070.00312.76
5.4.130.0060.00412.65
5.4.120.0060.00412.70
5.4.110.0110.00012.71
5.4.100.0110.00012.61
5.4.90.0070.00512.53
5.4.80.0080.00212.81
5.4.70.0070.00412.57
5.4.60.0070.00312.79
5.4.50.0090.00212.60
5.4.40.0060.00412.45
5.4.30.0090.00112.83
5.4.20.0080.00312.79
5.4.10.0050.00612.79
5.4.00.0070.00412.42
5.3.290.0070.00212.78
5.3.280.0080.00212.67
5.3.270.0100.00112.67
5.3.260.0080.00212.71
5.3.250.0090.00212.77
5.3.240.0050.00612.49
5.3.230.0080.00312.58
5.3.220.0040.00712.61
5.3.210.0090.00312.65
5.3.200.0080.00312.66
5.3.190.0070.00412.73
5.3.180.0060.00512.88
5.3.170.0070.00412.86
5.3.160.0050.00712.79
5.3.150.0060.00612.84
5.3.140.0050.00612.91
5.3.130.0040.00712.77
5.3.120.0060.00512.95
5.3.110.0070.00412.84
5.3.100.0070.00312.66
5.3.90.0070.00312.84
5.3.80.0020.00812.84
5.3.70.0090.00112.66
5.3.60.0070.00312.76
5.3.50.0090.00212.71
5.3.40.0050.00512.66
5.3.30.0030.00712.69
5.3.20.0050.00512.59
5.3.10.0030.00812.59
5.3.00.0080.00212.47
5.2.170.0060.00411.71
5.2.160.0040.00411.83
5.2.150.0040.00511.76
5.2.140.0070.00111.56
5.2.130.0040.00511.83
5.2.120.0040.00511.85
5.2.110.0040.00611.63
5.2.100.0090.00111.74
5.2.90.0030.00611.71
5.2.80.0040.00511.65
5.2.70.0050.00511.74
5.2.60.0020.00711.45
5.2.50.0070.00211.63
5.2.40.0050.00411.70
5.2.30.0050.00511.53
5.2.20.0030.00611.38
5.2.10.0060.00211.46
5.2.00.0060.00311.37
5.1.60.0030.00410.63
5.1.50.0050.00210.64
5.1.40.0020.00511.03
5.1.30.0070.00110.94
5.1.20.0040.00410.81
5.1.10.0020.00610.82
5.1.00.0030.00510.61
5.0.50.0050.00210.04
5.0.40.0020.0069.87
5.0.30.0030.0049.75
5.0.20.0050.0029.86
5.0.10.0030.0029.71
5.0.00.0030.0039.52
4.4.90.0040.0009.29
4.4.80.0040.0009.29
4.4.70.0040.0009.29
4.4.60.0020.0029.29
4.4.50.0020.0029.29
4.4.40.0020.0029.29
4.4.30.0020.0029.29
4.4.20.0030.0019.29
4.4.10.0040.0009.29
4.4.00.0040.0009.29
4.3.110.0000.0039.29
4.3.100.0020.0029.29
4.3.90.0040.0009.29
4.3.80.0030.0019.29
4.3.70.0040.0009.29
4.3.60.0020.0029.29
4.3.50.0020.0029.29
4.3.40.0030.0019.29
4.3.30.0000.0039.29
4.3.20.0010.0019.29
4.3.10.0020.0019.29
4.3.00.0020.0019.29

preferences:
35.82 ms | 403 KiB | 5 Q