3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputDate = "5/30/18"; $formatter = new IntlDateFormatter('en-US', IntlDateFormatter::SHORT, IntlDateFormatter::NONE, 'Europe/Berlin'); $timestamp = $formatter->parse($inputDate); print "Using date:\n"; print "Timestamp: {$timestamp}\n"; print "Formatted: ". date(\DateTime::ATOM ." e", $timestamp) ."\n"; print "MySQL: ". date("Y-m-d H:i:s", $timestamp) ."\n"; print "\n\nUsing DateTime(Immutable):\n"; $dt = \DateTimeImmutable::createFromFormat("!U", $timestamp); print "Formatted: ". $dt->format(\DateTime::ATOM ." e") ."\n"; print "MySQL: ". $dt->format("Y-m-d H:i:s") ."\n";

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.0030.02620.68
8.3.50.0130.01920.21
8.3.40.0100.01320.94
8.3.30.0080.00821.14
8.3.20.0000.00824.01
8.3.10.0030.00625.72
8.3.00.0000.00920.64
8.2.180.0120.02520.63
8.2.170.0130.00322.96
8.2.160.0040.01124.56
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0080.00022.81
8.2.120.0080.00026.35
8.2.110.0000.01024.39
8.2.100.0100.00321.03
8.2.90.0060.00321.16
8.2.80.0030.00621.29
8.2.70.0050.00520.93
8.2.60.0100.00521.03
8.2.50.0060.00620.50
8.2.40.0030.00624.39
8.2.30.0040.00421.81
8.2.20.0030.00621.04
8.2.10.0000.00820.90
8.2.00.0030.00521.16
8.1.280.0210.01425.92
8.1.270.0030.00626.09
8.1.260.0000.00826.35
8.1.250.0060.00328.09
8.1.240.0030.00621.21
8.1.230.0090.00320.77
8.1.220.0000.00920.66
8.1.210.0060.00320.48
8.1.200.0150.00320.35
8.1.190.0040.00420.25
8.1.180.0060.00321.96
8.1.170.0050.00521.89
8.1.160.0000.00821.05
8.1.150.0040.00421.30
8.1.140.0040.00420.68
8.1.130.0040.00721.29
8.1.120.0030.00520.55
8.1.110.0090.00020.71
8.1.100.0030.00620.54
8.1.90.0040.00420.66
8.1.80.0040.00420.76
8.1.70.0040.00420.77
8.1.60.0030.00620.69
8.1.50.0030.00620.69
8.1.40.0030.00620.57
8.1.30.0000.00821.03
8.1.20.0040.00420.95
8.1.10.0050.00320.78
8.1.00.0000.00820.62
8.0.300.0050.00320.04
8.0.290.0060.00320.00
8.0.280.0000.00720.83
8.0.270.0080.00020.33
8.0.260.0050.00220.06
8.0.250.0040.00420.25
8.0.240.0040.00420.27
8.0.230.0030.00620.26
8.0.220.0000.00820.26
8.0.210.0030.00620.21
8.0.200.0040.00420.34
8.0.190.0030.00520.43
8.0.180.0040.00420.41
8.0.170.0090.00020.23
8.0.160.0000.00820.37
8.0.150.0040.00420.19
8.0.140.0000.01120.24
8.0.130.0030.00313.32
8.0.120.0000.00820.16
8.0.110.0090.00020.30
8.0.100.0100.00020.20
8.0.90.0060.00320.46
8.0.80.0150.00620.38
8.0.70.0030.00520.40
8.0.60.0000.00920.23
8.0.50.0040.00420.19
8.0.30.0110.01020.08
8.0.20.0130.01020.61
8.0.10.0080.00020.38
8.0.00.0110.01220.02
7.4.330.0050.00015.55
7.4.320.0060.00319.98
7.4.300.0040.00419.79
7.4.290.0040.00419.82
7.4.280.0040.00419.96
7.4.270.0000.00719.66
7.4.260.0000.00819.89
7.4.250.0040.00419.74
7.4.240.0040.00419.95
7.4.230.0040.00419.73
7.4.220.0000.00919.61
7.4.210.0090.00819.87
7.4.200.0040.00419.85
7.4.160.0120.00819.93
7.4.140.0100.00919.82
7.4.130.0110.00919.78
7.4.120.0110.01219.84
7.4.110.0060.01319.67
7.4.100.0080.01119.81
7.4.90.0190.00320.01
7.4.80.0070.01719.78
7.4.70.0120.01219.68
7.4.60.0150.00319.80
7.4.50.0120.00619.83
7.4.40.0130.00519.78
7.4.00.0130.00618.29
7.3.330.0000.00513.03
7.3.320.0060.00013.18
7.3.310.0060.00319.66
7.3.300.0070.00519.68
7.3.290.0040.00419.54
7.3.280.0050.01219.49
7.3.260.0090.01219.57
7.3.240.0090.01119.80
7.3.230.0110.01119.79
7.3.210.0030.01519.99
7.3.200.0090.00919.85
7.3.190.0120.00919.74
7.3.180.0030.01919.87
7.3.170.0150.00719.39
7.3.160.0150.00619.70
7.3.120.0120.00918.12
7.3.110.0070.00317.80
7.3.100.0040.01118.02
7.3.90.0000.00917.91
7.3.80.0100.00018.30
7.3.70.0070.00718.00
7.3.60.0060.00917.85
7.3.50.0070.01117.99
7.3.40.0000.01317.77
7.3.30.0060.01217.93
7.3.20.0040.00819.50
7.3.10.0090.00719.65
7.3.00.0080.00719.54
7.2.330.0070.01319.96
7.2.320.0050.01419.72
7.2.310.0080.01219.79
7.2.300.0100.00719.43
7.2.290.0060.01719.65
7.2.240.0030.01018.29
7.2.230.0060.00318.20
7.2.220.0140.00017.94
7.2.210.0000.01218.15
7.2.200.0060.00318.09
7.2.190.0030.00718.02
7.2.180.0060.00918.18
7.2.170.0070.00718.09
7.2.160.0090.00918.24
7.2.150.0000.00920.09
7.2.140.0000.01820.16
7.2.130.0060.01020.06
7.2.120.0070.00720.12
7.2.110.0050.00720.04
7.2.100.0110.00020.07
7.2.90.0070.00920.25
7.2.80.0040.00920.06
7.2.70.0080.00720.31
7.2.60.0070.00720.18
7.2.50.0050.00720.28
7.2.40.0000.01620.23
7.2.30.0080.01320.56
7.2.20.0060.01320.52
7.2.10.0100.01020.70
7.2.00.0090.01220.40
7.1.330.0000.01619.27
7.1.320.0030.01418.96
7.1.310.0030.01219.06
7.1.300.0030.01319.21
7.1.290.0030.01318.79
7.1.280.0070.00718.89
7.1.270.0060.01219.16
7.1.260.0070.00419.21
7.1.250.0050.00719.14
7.1.200.0030.01018.83
7.1.150.0120.00920.23
7.1.140.0090.01320.38
7.1.130.0210.01419.93
7.1.120.0720.01520.15
7.1.110.0310.01519.71
7.1.100.0150.01719.50
7.1.90.0150.01219.41
7.1.80.0170.00919.42
7.1.70.0090.01118.85
7.1.60.0270.01436.05
7.1.50.0280.01435.78
7.1.40.0260.01435.21
7.1.30.0280.01335.55
7.1.20.0270.01735.52
7.1.10.0090.01118.44
7.1.00.0090.01318.50

preferences:
73.68 ms | 400 KiB | 5 Q