3v4l.org

run code in 300+ PHP versions simultaneously
<?php print "System Timezone: ". date_default_timezone_get() ."\n\n"; $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.48
8.3.50.0060.02220.52
8.3.40.0170.00320.95
8.3.30.0090.00621.11
8.3.20.0040.00424.16
8.3.10.0060.00325.89
8.3.00.0060.00320.93
8.2.180.0130.01721.00
8.2.170.0100.01022.96
8.2.160.0070.00724.39
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00422.60
8.2.120.0030.00626.35
8.2.110.0060.00324.53
8.2.100.0070.00721.03
8.2.90.0040.00420.75
8.2.80.0040.00421.15
8.2.70.0040.00420.93
8.2.60.0090.00620.75
8.2.50.0000.00820.75
8.2.40.0070.00322.38
8.2.30.0040.00421.79
8.2.20.0000.00920.99
8.2.10.0050.00320.89
8.2.00.0050.00321.18
8.1.280.0070.02825.92
8.1.270.0030.00626.13
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0070.00422.45
8.1.230.0040.00820.76
8.1.220.0000.00920.89
8.1.210.0000.00920.48
8.1.200.0030.00620.35
8.1.190.0120.00319.98
8.1.180.0040.00420.35
8.1.170.0030.00620.47
8.1.160.0040.00421.20
8.1.150.0040.00421.24
8.1.140.0000.00820.63
8.1.130.0000.00920.57
8.1.120.0000.00820.75
8.1.110.0040.00420.69
8.1.100.0080.00020.63
8.1.90.0030.00520.53
8.1.80.0030.00620.70
8.1.70.0000.00820.69
8.1.60.0030.00620.78
8.1.50.0000.00920.69
8.1.40.0080.00020.78
8.1.30.0030.00620.95
8.1.20.0030.00620.58
8.1.10.0030.00620.66
8.1.00.0060.00320.75
8.0.300.0000.00920.41
8.0.290.0000.00819.88
8.0.280.0040.00420.81
8.0.270.0030.00620.34
8.0.260.0040.00420.03
8.0.250.0040.00420.35
8.0.240.0040.00420.27
8.0.230.0030.00620.35
8.0.220.0040.00420.27
8.0.210.0000.00720.18
8.0.200.0000.00720.32
8.0.190.0050.00320.26
8.0.180.0030.00620.21
8.0.170.0030.00620.29
8.0.160.0040.00420.05
8.0.150.0000.00820.00
8.0.140.0060.00320.14
8.0.130.0060.00013.39
8.0.120.0030.00520.26
8.0.110.0030.00520.08
8.0.100.0080.00020.47
8.0.90.0040.00420.50
8.0.80.0070.01020.42
8.0.70.0030.00520.23
8.0.60.0030.00520.31
8.0.50.0000.00820.09
8.0.30.0080.01020.37
8.0.20.0100.01020.21
8.0.10.0040.00420.36
8.0.00.0060.01820.13
7.4.330.0000.00515.55
7.4.320.0000.01019.91
7.4.300.0000.00719.75
7.4.290.0080.00019.89
7.4.280.0030.00519.82
7.4.270.0060.00319.91
7.4.260.0040.00419.95
7.4.250.0000.00719.86
7.4.240.0040.00419.82
7.4.230.0030.00619.77
7.4.220.0090.00019.99
7.4.210.0090.00719.85
7.4.200.0040.00420.01
7.4.160.0090.01219.91
7.4.140.0100.00919.85
7.4.130.0100.01019.92
7.4.120.0080.01419.83
7.4.110.0140.00519.75
7.4.100.0110.00720.06
7.4.90.0160.00919.89
7.4.80.0130.01019.68
7.4.70.0200.00319.86
7.4.60.0060.01219.92
7.4.50.0060.01219.87
7.4.40.0130.00719.88
7.4.00.0050.01118.28
7.3.330.0020.00213.17
7.3.320.0030.00313.26
7.3.310.0030.00519.81
7.3.300.0040.00419.58
7.3.290.0000.00719.64
7.3.280.0300.00819.59
7.3.260.0150.01319.71
7.3.240.0130.00519.80
7.3.230.0070.01819.81
7.3.210.0040.01419.84
7.3.200.0060.01219.44
7.3.190.0100.00819.54
7.3.180.0060.01219.55
7.3.170.0140.00919.80
7.3.160.0090.00920.01
7.3.120.0090.01018.03
7.3.110.0090.01318.15
7.3.100.0100.00918.01
7.3.90.0050.00618.13
7.3.80.0040.01117.93
7.3.70.0020.01017.98
7.3.60.0070.00717.91
7.3.50.0050.00717.89
7.3.40.0070.00518.03
7.3.30.0100.00617.92
7.3.20.0080.00919.80
7.3.10.0020.01419.63
7.3.00.0050.00719.72
7.2.330.0120.00820.04
7.2.320.0080.01519.89
7.2.310.0030.01619.78
7.2.300.0110.00719.61
7.2.290.0170.00319.53
7.2.250.0120.00718.00
7.2.240.0110.01018.13
7.2.230.0070.00918.21
7.2.220.0060.01118.12
7.2.210.0070.00918.26
7.2.200.0060.01018.24
7.2.190.0040.00918.22
7.2.180.0030.01218.24
7.2.170.0040.00818.21
7.2.160.0070.01018.33
7.2.150.0080.00620.39
7.2.140.0090.00619.99
7.2.130.0030.01220.26
7.2.120.0000.01020.11
7.2.110.0130.00320.13
7.2.100.0150.00319.95
7.2.90.0030.01120.22
7.2.80.0060.00920.04
7.2.70.0060.01220.34
7.2.60.0090.00620.26
7.2.50.0070.01320.41
7.2.40.0080.00820.19
7.2.30.0080.01220.90
7.2.20.0100.01020.69
7.2.10.0070.01020.78
7.2.00.0060.01220.75
7.1.330.0090.01019.03
7.1.320.0050.01019.29
7.1.310.0010.01119.01
7.1.300.0060.00819.11
7.1.290.0030.00919.02
7.1.280.0060.00619.17
7.1.270.0100.00819.03
7.1.260.0070.00919.04
7.1.250.0040.01119.09
7.1.240.0060.01019.09
7.1.230.0090.00919.07
7.1.220.0060.01319.32
7.1.210.0090.00619.09
7.1.200.0060.00918.94
7.1.190.0030.01418.79
7.1.180.0080.01119.10
7.1.170.0040.01519.23
7.1.160.0090.00619.09
7.1.150.0080.01019.58
7.1.140.0100.01019.74
7.1.130.0100.00919.60
7.1.120.0100.01119.42
7.1.110.0150.00619.46
7.1.100.0110.00819.37
7.1.90.0090.01219.38
7.1.80.0070.00819.30
7.1.70.0080.01318.73
7.1.60.0220.01227.51
7.1.50.0200.00827.37
7.1.40.0150.01527.35
7.1.30.0230.01227.41
7.1.20.0170.01127.46
7.1.10.0090.01218.83
7.1.00.0120.00618.62
7.0.330.0060.00618.68
7.0.320.0050.00818.78
7.0.310.0100.00718.92
7.0.300.0070.00418.87
7.0.290.0030.01018.68
7.0.280.0070.00718.54
7.0.270.0000.01118.75
7.0.260.0070.00718.82
7.0.250.0030.01019.10
7.0.240.0000.01119.10
7.0.230.0100.00318.91
7.0.220.0070.00718.79
7.0.210.0040.01219.04
7.0.200.0100.00318.81
7.0.190.0140.00318.89
7.0.180.0120.00618.95
7.0.170.0070.01018.89
7.0.160.0120.00018.71
7.0.150.0040.00818.75
7.0.140.0100.00718.75
7.0.130.0130.00318.76
7.0.120.0100.00318.82
7.0.110.0000.01418.79
7.0.100.0080.00318.98
7.0.90.0070.01018.82
7.0.80.0040.01518.75
7.0.70.0030.01018.75
7.0.60.0030.00918.66
7.0.50.0110.00718.87
7.0.40.0030.01016.71
7.0.30.0030.00616.86
7.0.20.0000.01616.63
7.0.10.0040.01116.59
7.0.00.0040.01116.74
5.6.400.0000.01717.53
5.6.390.0100.00617.52
5.6.380.0060.00617.66
5.6.370.0070.01017.78
5.6.360.0080.00617.46
5.6.350.0030.01017.63
5.6.340.0030.01017.78
5.6.330.0000.01417.53
5.6.320.0100.00617.65
5.6.310.0060.01217.56
5.6.300.0070.00717.41
5.6.290.0070.01417.50
5.6.280.0100.00617.49
5.6.270.0070.00717.64
5.6.260.0060.00617.72
5.6.250.0130.00317.64
5.6.240.0090.00617.40
5.6.230.0130.00617.60
5.6.220.0060.00917.53
5.6.210.0060.00617.36
5.6.200.0070.01017.77
5.6.190.0070.00717.61
5.6.180.0080.00617.48
5.6.170.0090.00617.57
5.6.160.0110.00417.80
5.6.150.0030.01017.67
5.6.140.0040.00817.59
5.6.130.0030.01317.54
5.6.120.0060.00317.58
5.6.110.0090.00617.53
5.6.100.0030.00617.47
5.6.90.0090.00617.55
5.6.80.0090.00617.45
5.6.70.0040.00717.37
5.6.60.0060.00617.51
5.6.50.0030.01617.39
5.6.40.0080.00817.64
5.6.30.0030.01017.64
5.6.20.0090.00017.62
5.6.10.0030.00617.19
5.6.00.0030.00717.55

preferences:
54.55 ms | 400 KiB | 5 Q