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-2025')); //2025-02-06 var_dump(converteData('Y-m-d', 'D l F Y', '06 02 2025')); //2025-02-06

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.0130.00318.56
8.3.50.0040.01421.27
8.3.40.0100.00718.83
8.3.30.0090.00619.17
8.3.20.0070.00020.11
8.3.10.0040.00422.09
8.3.00.0070.00022.29
8.2.180.0040.01425.92
8.2.170.0070.00719.09
8.2.160.0140.00022.96
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0110.00426.16
8.2.120.0030.00719.90
8.2.110.0030.00722.17
8.2.100.0110.00018.04
8.2.90.0080.00018.34
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0040.00417.88
8.2.50.0050.00317.75
8.2.40.0030.00517.93
8.2.30.0090.00018.04
8.2.20.0050.00317.84
8.2.10.0050.00317.88
8.2.00.0050.00317.96
8.1.280.0220.00025.92
8.1.270.0040.00420.48
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00022.20
8.1.230.0030.00920.85
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00417.53
8.1.190.0030.00617.48
8.1.180.0030.00618.10
8.1.170.0060.00317.62
8.1.160.0040.00422.02
8.1.150.0050.00218.78
8.1.140.0050.00217.46
8.1.130.0000.00717.89
8.1.120.0050.00618.15
8.1.110.0070.00417.50
8.1.100.0040.00417.62
8.1.90.0050.00217.62
8.1.80.0000.00717.58
8.1.70.0060.00317.61
8.1.60.0030.00517.54
8.1.50.0000.00717.60
8.1.40.0030.00517.53
8.1.30.0000.00817.74
8.1.20.0050.00317.73
8.1.10.0000.00817.55
8.1.00.0030.00517.64
8.0.300.0000.00720.04
8.0.290.0070.00016.88
8.0.280.0000.00818.54
8.0.270.0030.00317.38
8.0.260.0000.00716.97
8.0.250.0040.00417.25
8.0.240.0000.00817.13
8.0.230.0050.00317.20
8.0.220.0000.00717.06
8.0.210.0000.00717.05
8.0.200.0070.00017.24
8.0.190.0030.00417.14
8.0.180.0030.00617.10
8.0.170.0070.00017.12
8.0.160.0050.00217.13
8.0.150.0000.00717.11
8.0.140.0000.00717.02
8.0.130.0000.00513.55
8.0.120.0060.00317.21
8.0.110.0050.00217.11
8.0.100.0030.00317.18
8.0.90.0000.00817.10
8.0.80.0090.00917.20
8.0.70.0000.00817.15
8.0.60.0030.00516.95
8.0.50.0080.00017.21
8.0.30.0100.00917.29
8.0.20.0100.01317.46
8.0.10.0040.00417.35
8.0.00.0110.00817.04
7.4.330.0050.00015.09
7.4.320.0030.00316.49
7.4.300.0030.00316.62
7.4.290.0030.00316.71
7.4.280.0030.00316.68
7.4.270.0030.00316.60
7.4.260.0070.00016.71
7.4.250.0040.00416.68
7.4.240.0020.00516.62
7.4.230.0000.00716.39
7.4.220.0070.00016.51
7.4.210.0040.01116.63
7.4.200.0070.00016.48
7.4.190.0040.00416.67
7.4.160.0060.01016.71
7.4.150.0120.00617.40
7.4.140.0140.00717.86
7.4.130.0110.00716.63
7.4.120.0090.00916.60
7.4.110.0030.01416.72
7.4.100.0070.01016.59
7.4.90.0150.00716.71
7.4.80.0110.01119.39
7.4.70.0100.00716.65
7.4.60.0170.00316.61
7.4.50.0080.00016.81
7.4.40.0060.00622.77
7.4.30.0120.00616.56
7.4.00.0030.01215.08
7.3.330.0000.00513.56
7.3.320.0050.00013.46
7.3.310.0070.00016.34
7.3.300.0030.00316.33
7.3.290.0090.00616.51
7.3.280.0100.00516.55
7.3.270.0090.00617.40
7.3.260.0100.01416.50
7.3.250.0100.00816.61
7.3.240.0030.01516.61
7.3.230.0150.01016.61
7.3.210.0130.00316.55
7.3.200.0110.01119.39
7.3.190.0130.00616.46
7.3.180.0080.00816.59
7.3.170.0030.01416.59
7.3.160.0100.00916.37
7.3.120.0070.01015.08
7.3.10.0060.00916.44
7.3.00.0040.00716.70
7.2.330.0060.01316.55
7.2.320.0200.00016.61
7.2.310.0110.00716.93
7.2.300.0070.01016.46
7.2.290.0070.01816.66
7.2.130.0040.01116.98
7.2.120.0110.00317.16
7.2.110.0000.01217.11
7.2.100.0070.01017.00
7.2.90.0040.00717.06
7.2.80.0120.00016.94
7.2.70.0100.00316.64
7.2.60.0030.00916.84
7.2.50.0090.00617.07
7.2.40.0070.00416.88
7.2.30.0050.00516.94
7.2.20.0080.00317.04
7.2.10.0030.00716.92
7.2.00.0080.00517.95
7.1.250.0040.00916.04
7.1.200.0050.00515.66
7.1.100.0090.00317.91
7.1.70.0030.00517.30
7.1.60.0070.01719.82
7.1.50.0060.00616.98
7.1.00.0030.04322.28
7.0.200.0000.01016.82
7.0.140.0100.07022.09
7.0.60.0000.07021.83
7.0.50.0000.06017.73
7.0.40.0130.06720.27
7.0.30.0230.05320.17
7.0.20.0370.08320.09
7.0.10.0400.08020.29
7.0.00.0070.04020.14
5.6.280.0000.07721.13
5.6.210.0030.08720.65
5.6.200.0070.03718.28
5.6.190.0130.05020.37
5.6.180.3330.04720.48
5.6.170.0130.08720.44
5.6.160.0100.04720.55
5.6.150.0130.06018.27
5.6.140.0030.05718.11
5.6.130.0070.08018.27
5.6.120.0030.07720.99
5.6.110.0030.07321.01
5.6.100.0070.05020.96
5.6.90.0130.03321.02
5.6.80.0030.08020.39
5.5.350.3600.04020.45
5.5.340.0030.04317.94
5.5.330.0130.07320.48
5.5.320.0300.08020.34
5.5.310.0130.04320.30
5.5.300.0030.06318.08
5.5.290.0000.04717.96
5.5.280.0070.04720.69
5.5.270.0200.05020.73
5.5.260.0070.07720.86
5.5.250.0070.09020.69
5.5.240.0130.04720.22
5.4.450.0700.06319.34
5.4.440.0770.06019.61
5.4.430.0900.05019.69
5.4.420.0870.06019.46
5.4.410.0830.05019.46
5.4.400.1530.05718.50
5.4.390.1070.05718.80
5.4.380.0230.05318.74
5.4.370.0170.05018.78
5.4.360.0070.05718.57
5.4.350.0080.03312.02
5.4.340.0080.03412.01
5.4.320.0070.03812.50
5.4.310.0030.04212.50
5.4.300.0070.04112.51
5.4.290.0060.03912.50
5.4.280.0050.03812.40
5.4.270.0030.03812.40
5.4.260.0060.04212.40
5.4.250.0200.04318.96
5.4.240.0100.05318.79
5.4.230.0200.05718.92
5.4.220.0070.06718.93
5.4.210.0200.04318.98
5.4.200.0100.05718.92
5.4.190.0070.07319.00
5.4.180.0130.05018.72
5.4.170.0070.05718.91
5.4.160.0100.05318.96
5.4.150.0100.05318.98
5.4.140.0030.05316.39
5.4.130.0100.05016.56
5.4.120.0070.06016.38
5.4.110.0100.04716.33
5.4.100.0200.04016.52
5.4.90.0070.05316.38
5.4.80.0100.07016.48
5.4.70.0130.04716.30
5.4.60.0070.05016.64
5.4.50.0030.06016.31
5.4.40.0030.05716.51
5.4.30.0170.06016.53
5.4.20.0170.06316.44
5.4.10.0070.05016.46
5.4.00.0070.05015.86
5.3.290.0080.04212.80
5.3.280.0000.06014.61
5.3.270.0100.05714.79
5.3.260.0170.05014.70
5.3.250.0000.06014.67
5.3.240.0070.05014.61
5.3.230.0070.05314.68
5.3.220.0100.05314.54
5.3.210.0170.05014.74
5.3.200.0070.05314.70
5.3.190.0070.05314.55
5.3.180.0100.05014.39
5.3.170.0200.04014.74
5.3.160.0200.06014.73
5.3.150.0100.05714.74
5.3.140.0200.06314.69
5.3.130.0130.06314.61
5.3.120.0070.07714.54
5.3.110.0030.05314.64
5.3.100.0230.05713.93
5.3.90.0170.04314.11
5.3.80.0070.05014.02
5.3.70.0070.05714.18
5.3.60.0100.05014.00
5.3.50.0130.04714.05
5.3.40.0100.04714.17
5.3.30.0070.04713.89
5.3.20.0100.04713.71
5.3.10.0030.05313.63
5.3.00.0100.04313.63
5.2.170.0030.04311.21
5.2.160.0070.04011.21
5.2.150.0000.04711.23
5.2.140.0030.04311.21
5.2.130.0100.03710.93
5.2.120.0130.03011.17
5.2.110.0070.03711.06
5.2.100.0100.03311.11
5.2.90.0130.03311.18
5.2.80.0170.03011.00
5.2.70.0170.03311.08
5.2.60.0100.03710.96
5.2.50.0070.04010.92
5.2.40.0030.04010.90
5.2.30.0030.04011.03
5.2.20.0030.04311.05
5.2.10.0030.04310.83
5.2.00.0070.03710.71
5.1.60.0000.0409.99
5.1.50.0000.05010.24
5.1.40.0070.03310.18
5.1.30.0030.04010.41
5.1.20.0070.03710.18
5.1.10.0030.04710.13
5.1.00.0070.04010.22
5.0.50.0070.0378.61
5.0.40.0030.0408.33
5.0.30.0000.0438.24
5.0.20.0030.0278.03
5.0.10.0030.0278.22
5.0.00.0000.0438.39
4.4.90.0030.0276.73
4.4.80.0000.0236.73
4.4.70.0070.0276.73
4.4.60.0070.0176.73
4.4.50.0100.0136.73
4.4.40.0070.0306.73
4.4.30.0070.0236.73
4.4.20.0030.0306.73
4.4.10.0100.0236.73
4.4.00.0000.0406.73
4.3.110.0100.0236.73
4.3.100.0030.0206.73
4.3.90.0030.0306.73
4.3.80.0000.0376.73
4.3.70.0030.0206.73
4.3.60.0000.0206.73
4.3.50.0000.0236.73
4.3.40.0000.0406.73
4.3.30.0000.0306.73
4.3.20.0000.0336.73
4.3.10.0000.0306.73
4.3.00.0100.0277.11

preferences:
35.99 ms | 401 KiB | 5 Q