3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convert_timestamp($timestamp, $timezone) { $tz = new DateTimeZone($timezone); $raw = DateTime::createFromFormat('n/j/Y G:i', $timestamp, $tz); $utc = new DateTimeZone("UTC"); $raw->setTimezone($utc); return $raw->format('Y-m-d G:i:s'); } echo convert_timestamp("7/19/2014 8:00", "CST"); ?>

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.00316.38
8.3.50.0110.00622.05
8.3.40.0140.00018.75
8.3.30.0130.00619.10
8.3.20.0000.00720.34
8.3.10.0040.00421.78
8.3.00.0080.00017.80
8.2.180.0040.01816.32
8.2.170.0100.01022.96
8.2.160.0180.00020.43
8.2.150.0000.00724.18
8.2.140.0090.00624.66
8.2.130.0070.00026.16
8.2.120.0080.00020.89
8.2.110.0060.00322.06
8.2.100.0060.00617.84
8.2.90.0080.00018.94
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0050.00318.28
8.2.30.0030.00718.19
8.2.20.0080.00017.79
8.2.10.0050.00317.88
8.2.00.0070.00017.87
8.1.280.0150.00425.92
8.1.270.0050.00323.92
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00823.91
8.1.230.0040.00819.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00417.13
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0050.00318.39
8.1.160.0050.00321.96
8.1.150.0040.00418.74
8.1.140.0020.00517.45
8.1.130.0000.00717.77
8.1.120.0050.00217.54
8.1.110.0050.00317.49
8.1.100.0030.00517.45
8.1.90.0030.00317.38
8.1.80.0040.00417.45
8.1.70.0000.00717.39
8.1.60.0040.00417.60
8.1.50.0030.00517.45
8.1.40.0040.00417.52
8.1.30.0030.00517.66
8.1.20.0040.00417.53
8.1.10.0080.00017.57
8.1.00.0000.00817.54
8.0.300.0030.00518.77
8.0.290.0040.00416.88
8.0.280.0030.00318.56
8.0.270.0000.00717.27
8.0.260.0030.00317.26
8.0.250.0000.00717.07
8.0.240.0030.00617.10
8.0.230.0000.00816.94
8.0.220.0030.00316.93
8.0.210.0070.00016.93
8.0.200.0000.00717.04
8.0.190.0000.00717.01
8.0.180.0000.00717.06
8.0.170.0040.00416.99
8.0.160.0080.00016.93
8.0.150.0020.00516.97
8.0.140.0000.00716.91
8.0.130.0000.00713.40
8.0.120.0080.00016.99
8.0.110.0000.00716.91
8.0.100.0000.00716.89
8.0.90.0030.00516.81
8.0.80.0060.00916.95
8.0.70.0040.00416.86
8.0.60.0080.00016.86
8.0.50.0040.00416.84
8.0.30.0070.01617.10
8.0.20.0080.01017.40
8.0.10.0040.00416.90
8.0.00.0100.00916.79
7.4.330.0020.00215.04
7.4.320.0040.00416.55
7.4.300.0030.00316.61
7.4.290.0070.00016.53
7.4.280.0040.00416.65
7.4.270.0070.00016.60
7.4.260.0000.00716.53
7.4.250.0040.00416.58
7.4.240.0000.00716.54
7.4.230.0000.00716.59
7.4.220.0150.00616.70
7.4.210.0000.01616.52
7.4.200.0050.00316.46
7.4.160.0000.01616.71
7.4.150.0170.00317.40
7.4.140.0090.00817.86
7.4.130.0140.00316.63
7.4.120.0150.00516.54
7.4.110.0030.01416.48
7.4.100.0100.00716.60
7.4.90.0030.01316.59
7.4.80.0090.00919.39
7.4.70.0040.01216.55
7.4.60.0070.01116.55
7.4.50.0040.00016.48
7.4.40.0070.01016.49
7.4.30.0070.01016.53
7.4.00.0060.00914.86
7.3.330.0030.00313.33
7.3.320.0030.00313.23
7.3.310.0000.00716.22
7.3.300.0000.00716.41
7.3.290.0100.01016.39
7.3.280.0090.01116.34
7.3.270.0080.00817.40
7.3.260.0110.00816.50
7.3.250.0080.00916.42
7.3.240.0130.01016.32
7.3.230.0090.01216.57
7.3.210.0090.00916.51
7.3.200.0140.00819.39
7.3.190.0070.01116.52
7.3.180.0100.01016.52
7.3.170.0120.00416.45
7.3.160.0060.01016.46
7.3.120.0110.00714.98
7.2.330.0130.00316.90
7.2.320.0150.00316.84
7.2.310.0100.00716.50
7.2.300.0100.01016.85
7.2.290.0120.00616.45
7.1.100.0060.00618.13
7.1.70.0050.00216.96
7.1.60.0120.01219.70
7.1.50.0070.01717.02
7.1.00.0030.07722.44
7.0.200.0040.00416.93
7.0.140.0030.07321.95
7.0.60.0070.06019.93
7.0.50.0130.05317.87
7.0.40.0130.08320.27
7.0.30.0170.05020.21
7.0.20.0270.04320.19
7.0.10.0170.04720.09
7.0.00.0070.08720.24
5.6.280.0000.07720.91
5.6.210.0130.05720.57
5.6.200.0070.08018.19
5.6.190.0130.08320.63
5.6.180.0400.07320.77
5.6.170.0270.07720.62
5.6.160.0130.06320.39
5.6.150.0070.08018.12
5.6.140.0100.07718.20
5.6.130.0000.05018.17
5.6.120.0030.08320.90
5.6.110.0070.08321.02
5.6.100.0100.08020.98
5.6.90.0070.08321.00
5.6.80.0030.08720.41
5.5.350.0300.07320.45
5.5.340.0030.07718.00
5.5.330.0170.07320.43
5.5.320.0030.04020.31
5.5.310.0230.07020.51
5.5.300.0030.06717.97
5.5.290.0070.08017.94
5.5.280.0100.07320.96
5.5.270.0130.07720.64
5.5.260.0070.06720.79
5.5.250.0070.08020.55
5.5.240.0100.06720.25
5.4.450.0670.05719.71
5.4.440.0200.05319.58
5.4.430.0300.05319.47
5.4.420.0130.05719.69
5.4.410.0130.05719.23
5.4.400.0230.05019.30
5.4.390.0200.05319.12
5.4.380.0370.05318.70
5.4.370.0570.04318.74
5.4.360.0430.04318.79
5.4.350.0230.06318.59
5.4.340.0400.05018.62
5.4.320.0040.03912.50
5.4.310.0070.03712.50
5.4.300.0050.04212.50
5.4.290.0030.04312.50
5.4.280.0040.03812.40
5.4.270.0070.03612.40
5.4.260.0030.04112.40
5.4.250.0080.04112.40
5.4.240.0110.03712.40
5.4.230.0040.04412.39
5.4.220.0080.03712.39
5.4.210.0050.03812.39
5.4.200.0110.04812.39
5.4.190.0090.04112.39
5.4.180.0060.03712.39
5.4.170.0040.03812.39
5.4.160.0060.03712.39
5.4.150.0040.03812.39
5.4.140.0100.04012.07
5.4.130.0020.03912.06
5.4.120.0040.03712.02
5.4.110.0080.03412.01
5.4.100.0040.03712.01
5.4.90.0060.03612.01
5.4.80.0080.03512.01
5.4.70.0060.03412.01
5.4.60.0080.03212.01
5.4.50.0060.03512.01
5.4.40.0050.03512.00
5.4.30.0080.03311.99
5.4.20.0090.03311.99
5.4.10.0050.03511.99
5.4.00.0070.03411.48
5.3.290.0080.04312.80
5.3.280.0050.03812.70
5.3.270.0050.03912.72
5.3.260.0030.04312.72
5.3.250.0060.03712.72
5.3.240.0050.03712.72
5.3.230.0050.03912.71
5.3.220.0040.03912.68
5.3.210.0060.03912.68
5.3.200.0080.03512.68
5.3.190.0060.03712.68
5.3.180.0040.03812.68
5.3.170.0060.03612.67
5.3.160.0100.03312.67
5.3.150.0060.03712.68
5.3.140.0070.03512.66
5.3.130.0060.03812.66
5.3.120.0020.04212.66
5.3.110.0060.03812.66
5.3.100.0080.04112.12
5.3.90.0090.03812.10
5.3.80.0090.03612.09
5.3.70.0070.04412.09
5.3.60.0070.03612.08
5.3.50.0110.03112.02
5.3.40.0080.03912.02
5.3.30.0070.03411.98
5.3.20.0060.03611.76
5.3.10.0080.03811.73
5.3.00.0080.04011.72
5.2.170.0020.0349.22
5.2.160.0060.0309.22
5.2.150.0080.0349.22
5.2.140.0100.0339.21
5.2.130.0070.0359.19
5.2.120.0040.0299.18
5.2.110.0050.0299.18
5.2.100.0050.0329.18
5.2.90.0070.0329.18
5.2.80.0040.0349.17
5.2.70.0030.0329.17
5.2.60.0020.0329.13
5.2.50.0080.0269.10
5.2.40.0020.0319.08
5.2.30.0130.0269.05
5.2.20.0080.0269.04
5.2.10.0040.0298.94
5.2.00.0050.0308.81
5.1.60.0050.0238.09
5.1.50.0060.0268.09
5.1.40.0030.0298.07
5.1.30.0020.0318.42
5.1.20.0040.0278.44
5.1.10.0060.0248.16
5.1.00.0070.0288.16
5.0.50.0040.0206.64
5.0.40.0050.0176.50
5.0.30.0060.0286.31
5.0.20.0030.0196.28
5.0.10.0040.0196.26
5.0.00.0040.0306.25
4.4.90.0020.0164.78
4.4.80.0050.0134.75
4.4.70.0010.0194.75
4.4.60.0030.0154.75
4.4.50.0010.0174.77
4.4.40.0050.0224.70
4.4.30.0030.0154.76
4.4.20.0020.0204.84
4.4.10.0020.0164.85
4.4.00.0030.0244.76
4.3.110.0030.0154.67
4.3.100.0020.0164.66
4.3.90.0040.0134.63
4.3.80.0040.0274.58
4.3.70.0020.0224.63
4.3.60.0050.0184.63
4.3.50.0010.0174.62
4.3.40.0020.0244.54
4.3.30.0010.0173.30
4.3.20.0010.0173.27
4.3.10.0020.0153.24
4.3.00.0070.0177.82

preferences:
36.36 ms | 401 KiB | 5 Q