3v4l.org

run code in 300+ PHP versions simultaneously
<?php function converteData($format, $to_format, $date, $timezone = null) { if (!$timezone) { $timezone = new DateTimeZone(date_default_timezone_get()); } $d = date_create_from_format($format, $date, $timezone); return date_format($d, $to_format); } /* * Exemplos */ var_dump(converteData('d m Y', 'Y-m-d', '06 02 2025')); //2025-02-06 var_dump(converteData('d-m-Y', 'm/d/Y H:i', '06-02-2014')); //2014-02-06 12:38 var_dump(converteData('Y-m-d', 'l F Y H:i', '2014-02-06')); //Thursday February 2014 12:38

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.0120.00818.30
8.3.50.0120.00321.14
8.3.40.0040.01418.88
8.3.30.0030.01019.04
8.3.20.0040.00420.09
8.3.10.0090.00021.80
8.3.00.0080.00022.51
8.2.180.0160.00318.16
8.2.170.0060.00922.96
8.2.160.0100.00320.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0000.01019.79
8.2.110.0030.00620.53
8.2.100.0040.00819.24
8.2.90.0080.00019.21
8.2.80.0050.00319.13
8.2.70.0000.00817.63
8.2.60.0060.00318.05
8.2.50.0050.00318.07
8.2.40.0000.00718.03
8.2.30.0000.00818.08
8.2.20.0000.00817.79
8.2.10.0050.00317.80
8.2.00.0070.00017.73
8.1.280.0140.00025.92
8.1.270.0090.00020.38
8.1.260.0070.00326.35
8.1.250.0050.00228.09
8.1.240.0090.00023.79
8.1.230.0080.00419.16
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0000.00817.30
8.1.180.0050.00318.77
8.1.170.0030.00518.68
8.1.160.0000.00722.16
8.1.150.0000.00818.77
8.1.140.0000.00717.51
8.1.130.0030.00317.75
8.1.120.0000.00717.46
8.1.110.0090.00017.48
8.1.100.0000.00817.56
8.1.90.0070.00017.60
8.1.80.0040.00417.56
8.1.70.0030.00517.43
8.1.60.0000.00817.63
8.1.50.0050.00317.57
8.1.40.0040.00417.52
8.1.30.0040.00417.70
8.1.20.0050.00317.70
8.1.10.0000.00817.51
8.1.00.0000.00817.57
8.0.300.0000.00718.77
8.0.290.0060.00317.05
8.0.280.0030.00318.58
8.0.270.0030.00317.39
8.0.260.0030.00316.89
8.0.250.0030.00317.15
8.0.240.0000.00717.17
8.0.230.0070.00017.16
8.0.220.0040.00416.95
8.0.210.0020.00517.08
8.0.200.0000.00717.15
8.0.190.0000.00717.18
8.0.180.0040.00417.11
8.0.170.0000.00817.00
8.0.160.0050.00317.02
8.0.150.0040.00416.93
8.0.140.0020.00517.03
8.0.130.0000.00513.44
8.0.120.0030.00616.98
8.0.110.0050.00317.06
8.0.100.0000.00817.04
8.0.90.0040.00416.94
8.0.80.0030.01317.10
8.0.70.0050.00317.16
8.0.60.0070.00017.04
8.0.50.0000.00817.07
8.0.30.0100.01317.00
8.0.20.0100.01017.40
8.0.10.0040.00417.21
8.0.00.0110.00616.96
7.4.330.0030.00315.00
7.4.320.0030.00316.70
7.4.300.0050.00216.68
7.4.290.0060.00316.63
7.4.280.0070.00016.57
7.4.270.0000.00716.48
7.4.260.0000.00716.58
7.4.250.0030.00516.63
7.4.240.0040.00316.64
7.4.230.0000.00716.63
7.4.220.0160.01016.70
7.4.210.0140.00616.59
7.4.200.0030.00316.56
7.4.190.0030.00316.64
7.4.160.0090.00616.69
7.4.150.0090.01517.40
7.4.140.0110.00817.86
7.4.130.0120.00616.61
7.4.120.0140.00616.53
7.4.110.0100.00716.45
7.4.100.0040.01216.80
7.4.90.0170.00016.57
7.4.80.0170.00719.39
7.4.70.0060.01116.56
7.4.60.0120.00916.71
7.4.50.0030.00516.42
7.4.40.0060.01322.77
7.4.30.0190.00316.79
7.4.00.0080.00415.01
7.3.330.0030.00313.29
7.3.320.0020.00213.19
7.3.310.0000.00716.48
7.3.300.0000.00716.48
7.3.290.0110.00316.50
7.3.280.0120.00416.45
7.3.270.0100.00917.40
7.3.260.0110.00716.63
7.3.250.0100.01116.57
7.3.240.0070.01516.58
7.3.230.0150.00916.65
7.3.210.0060.01216.48
7.3.200.0120.01619.39
7.3.190.0120.00616.84
7.3.180.0060.01016.45
7.3.170.0110.00616.38
7.3.160.0180.00416.60
7.3.120.0100.00315.09
7.2.330.0150.00416.98
7.2.320.0150.00616.45
7.2.310.0140.00516.85
7.2.300.0120.00616.54
7.2.290.0060.01216.88
7.2.60.0040.01116.91
7.2.00.0120.00919.79
7.1.200.0080.00815.86
7.1.100.0030.00918.00
7.1.70.0090.00017.26
7.1.60.0100.01319.82
7.1.50.0160.00616.88
7.1.00.0000.05022.27
7.0.200.0000.00916.98
7.0.140.0070.07021.95
7.0.60.0170.07720.05
7.0.50.0130.07717.92
7.0.40.0030.04720.40
7.0.30.0230.08320.02
7.0.20.0370.07720.19
7.0.10.0330.06720.24
7.0.00.0130.04020.09
5.6.280.0070.07020.86
5.6.210.0100.07320.63
5.6.200.0030.04318.19
5.6.190.0000.06320.64
5.6.180.3000.04020.58
5.6.170.0270.05020.58
5.6.160.0100.05720.48
5.6.150.0070.08018.14
5.6.140.0170.07318.15
5.6.130.0130.03318.14
5.6.120.0030.04321.15
5.6.110.0000.06320.98
5.6.100.0070.06321.14
5.6.90.0070.08021.14
5.6.80.0030.04020.37
5.6.70.0200.07720.25
5.5.350.0170.04720.50
5.5.340.0070.04717.96
5.5.330.0030.05720.40
5.5.320.0200.04720.42
5.5.310.0100.04720.37
5.5.300.0030.06017.92
5.5.290.0130.07717.97
5.5.280.0070.03720.97
5.5.270.0130.08020.95
5.5.260.0030.08720.89
5.5.250.0100.08020.50
5.5.240.0130.05020.32
5.4.450.0970.05719.61
5.4.440.0770.05319.31
5.4.430.0830.06019.16
5.4.420.0100.06019.58
5.4.410.0500.05719.47
5.4.400.0300.05318.82
5.4.390.7830.06318.77
5.4.380.0370.04718.80
5.4.370.0070.06018.61
5.4.360.0100.05718.77
5.4.350.0080.04012.02
5.4.340.0100.03612.02
5.4.320.0070.04512.50
5.4.310.0030.04112.50
5.4.300.0100.03712.51
5.4.290.0070.03812.50
5.4.280.0050.03612.40
5.4.270.0050.03912.40
5.4.260.0090.03912.40
5.4.250.0070.07718.76
5.4.240.0070.06718.97
5.4.230.0270.05318.79
5.4.220.0070.05318.96
5.4.210.0230.06318.96
5.4.200.0070.05018.79
5.4.190.0130.04718.64
5.4.180.0100.05018.92
5.4.170.0030.06018.87
5.4.160.0030.05318.79
5.4.150.0070.07718.79
5.4.140.0100.05016.39
5.4.130.0000.05716.55
5.4.120.0100.06716.47
5.4.110.0070.05316.34
5.4.100.0030.05016.48
5.4.90.0200.04016.39
5.4.80.0070.05016.50
5.4.70.0170.04316.55
5.4.60.0000.06016.54
5.4.50.0030.05016.46
5.4.40.0030.05716.59
5.4.30.0070.05016.46
5.4.20.0070.05716.35
5.4.10.0070.05016.42
5.4.00.0070.05015.76
5.3.290.0070.04412.80
5.3.280.0130.04714.68
5.3.270.0030.05314.51
5.3.260.0030.08714.77
5.3.250.0170.04314.69
5.3.240.0030.05314.68
5.3.230.0030.05714.59
5.3.220.0070.05014.65
5.3.210.0130.05014.74
5.3.200.0100.05014.58
5.3.190.0000.06014.70
5.3.180.0030.05714.66
5.3.170.0070.07314.54
5.3.160.0070.05014.64
5.3.150.0070.05014.64
5.3.140.0000.05714.52
5.3.130.0100.05014.63
5.3.120.0030.05714.77
5.3.110.0100.05014.53
5.3.100.0070.06014.12
5.3.90.0070.05014.23
5.3.80.0100.04714.20
5.3.70.0170.05714.03
5.3.60.0100.07314.08
5.3.50.0070.05714.13
5.3.40.0070.05314.13
5.3.30.0200.05013.98
5.3.20.0130.04013.66
5.3.10.0030.05013.63
5.3.00.0070.05713.86
5.2.170.0100.04011.23
5.2.160.0070.04011.22
5.2.150.0130.05011.05
5.2.140.0070.05710.97
5.2.130.0000.06311.17
5.2.120.0000.04711.10
5.2.110.0100.03311.10
5.2.100.0000.04311.17
5.2.90.0100.03311.05
5.2.80.0100.03311.31
5.2.70.0030.06011.15
5.2.60.0030.04711.13
5.2.50.0070.06010.97
5.2.40.0170.02711.22
5.2.30.0030.04311.06
5.2.20.0030.04010.94
5.2.10.0030.04011.08
5.2.00.0000.04310.79
5.1.60.0030.03310.15
5.1.50.0030.0339.97
5.1.40.0130.0239.98
5.1.30.0030.03710.31
5.1.20.0070.03310.57
5.1.10.0000.0409.98
5.1.00.0070.03310.13
5.0.50.0030.0278.61
5.0.40.0030.0278.48
5.0.30.0000.0438.18
5.0.20.0070.0308.15
5.0.10.0000.0308.13
5.0.00.0070.0378.20
4.4.90.0030.0206.25
4.4.80.0070.0176.25
4.4.70.0070.0176.25
4.4.60.0070.0206.25
4.4.50.0000.0236.25
4.4.40.0030.0336.25
4.4.30.0000.0236.25
4.4.20.0070.0176.25
4.4.10.0000.0236.25
4.4.00.0070.0336.25
4.3.110.0030.0206.25
4.3.100.0000.0236.25
4.3.90.0000.0206.25
4.3.80.0000.0336.25
4.3.70.0170.0076.25
4.3.60.0100.0136.25
4.3.50.0030.0206.25
4.3.40.0030.0336.25
4.3.30.0000.0236.25
4.3.20.0070.0236.25
4.3.10.0000.0306.25
4.3.00.0170.0237.11

preferences:
37.36 ms | 401 KiB | 5 Q