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 12:38 var_dump(converteData('Y-m-d', 'l F Y H:i', '2014-02-06')); //Thursday February 2014

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.0040.01118.18
8.3.50.0080.00821.14
8.3.40.0070.00718.88
8.3.30.0030.01419.04
8.3.20.0080.00020.39
8.3.10.0040.00421.96
8.3.00.0070.00022.40
8.2.180.0150.00316.75
8.2.170.0100.00722.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0040.00419.66
8.2.110.0030.00620.38
8.2.100.0000.01119.32
8.2.90.0020.00519.40
8.2.80.0060.00319.15
8.2.70.0080.00017.61
8.2.60.0000.00918.05
8.2.50.0040.00418.07
8.2.40.0060.00318.22
8.2.30.0000.00718.14
8.2.20.0030.00517.92
8.2.10.0000.00717.79
8.2.00.0000.00817.92
8.1.280.0130.00325.92
8.1.270.0000.00820.22
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00323.87
8.1.230.0040.00818.86
8.1.220.0000.00817.77
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0060.00317.53
8.1.180.0040.00418.74
8.1.170.0080.00018.53
8.1.160.0000.00822.13
8.1.150.0000.00718.79
8.1.140.0040.00417.57
8.1.130.0030.00317.82
8.1.120.0000.00717.48
8.1.110.0060.00317.50
8.1.100.0050.00217.56
8.1.90.0000.00717.50
8.1.80.0000.00717.52
8.1.70.0070.00017.61
8.1.60.0000.00817.62
8.1.50.0050.00317.55
8.1.40.0040.00417.61
8.1.30.0030.00617.72
8.1.20.0030.00617.75
8.1.10.0070.00017.54
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0050.00217.18
8.0.280.0030.00318.42
8.0.270.0000.00817.24
8.0.260.0030.00317.02
8.0.250.0030.00317.17
8.0.240.0000.00817.05
8.0.230.0000.00717.14
8.0.220.0070.00017.00
8.0.210.0000.00817.11
8.0.200.0040.00417.20
8.0.190.0030.00317.13
8.0.180.0050.00217.02
8.0.170.0030.00517.12
8.0.160.0070.00016.98
8.0.150.0040.00417.07
8.0.140.0000.00717.04
8.0.130.0000.00613.43
8.0.120.0110.00016.98
8.0.110.0040.00417.12
8.0.100.0040.00417.14
8.0.90.0050.00316.99
8.0.80.0070.00717.05
8.0.70.0030.00316.98
8.0.60.0000.00817.11
8.0.50.0040.00417.15
8.0.30.0110.00817.21
8.0.20.0130.00917.40
8.0.10.0000.00717.27
8.0.00.0110.00616.89
7.4.330.0020.00215.21
7.4.320.0030.00316.52
7.4.300.0000.00716.59
7.4.290.0040.00416.72
7.4.280.0000.00716.70
7.4.270.0000.00716.68
7.4.260.0050.00216.49
7.4.250.0000.00716.59
7.4.240.0060.00216.65
7.4.230.0000.00716.66
7.4.220.0060.01316.64
7.4.210.0070.01016.61
7.4.200.0040.00416.66
7.4.190.0070.00016.63
7.4.160.0090.00616.60
7.4.150.0120.00617.40
7.4.140.0080.01217.86
7.4.130.0130.00516.65
7.4.120.0130.00916.68
7.4.110.0120.00416.68
7.4.100.0100.00716.79
7.4.90.0060.01216.62
7.4.80.0090.00919.39
7.4.70.0110.00816.44
7.4.60.0090.00916.59
7.4.50.0000.00416.84
7.4.40.0130.00722.77
7.4.30.0030.01416.42
7.4.00.0090.00914.85
7.3.330.0050.00013.25
7.3.320.0000.00513.24
7.3.310.0040.00416.25
7.3.300.0060.00016.44
7.3.290.0030.01616.38
7.3.280.0070.01216.46
7.3.270.0080.01517.40
7.3.260.0060.01216.38
7.3.250.0100.01016.57
7.3.240.0080.01516.39
7.3.230.0060.01216.48
7.3.210.0130.00316.57
7.3.200.0090.00619.39
7.3.190.0120.00816.43
7.3.180.0040.01116.36
7.3.170.0120.00916.58
7.3.160.0030.01316.80
7.3.120.0080.00515.06
7.3.00.0030.00616.97
7.2.330.0100.00716.91
7.2.320.0150.00916.85
7.2.310.0120.00616.88
7.2.300.0140.00316.78
7.2.290.0130.00916.83
7.2.130.0060.00917.10
7.2.120.0030.00917.10
7.2.110.0030.01317.05
7.2.100.0100.00317.10
7.2.90.0000.01517.17
7.2.80.0000.01316.77
7.2.70.0030.00816.76
7.2.60.0050.01117.01
7.2.50.0070.00716.79
7.2.40.0060.01216.94
7.2.30.0040.01216.82
7.2.20.0030.01017.02
7.2.10.0040.01117.11
7.2.00.0090.00918.13
7.1.250.0040.01115.76
7.1.240.0040.00715.68
7.1.230.0070.00715.96
7.1.220.0100.00315.78
7.1.210.0000.01416.07
7.1.200.0040.00715.86
7.1.190.0000.00915.64
7.1.180.0000.00915.67
7.1.170.0090.00315.66
7.1.160.0060.00616.07
7.1.150.0030.00515.67
7.1.140.0090.00615.93
7.1.130.0060.00815.42
7.1.120.0000.00815.78
7.1.110.0080.00416.00
7.1.100.0030.01017.15
7.1.90.0030.01015.90
7.1.80.0030.01015.95
7.1.70.0040.00616.43
7.1.60.0020.01317.76
7.1.50.0060.00616.43
7.1.40.0070.00715.91
7.1.30.0090.00615.68
7.1.20.0000.01215.86
7.1.10.0030.01015.80
7.1.00.0050.03218.97
7.0.330.0000.01515.36
7.0.320.0070.00715.15
7.0.310.0060.00615.73
7.0.300.0110.00315.52
7.0.290.0040.00815.33
7.0.280.0060.00615.70
7.0.270.0000.01515.70
7.0.260.0000.01115.52
7.0.250.0040.00415.45
7.0.240.0030.00715.28
7.0.230.0040.00815.63
7.0.220.0000.01715.44
7.0.210.0030.00715.70
7.0.200.0030.00516.33
7.0.190.0040.00715.39
7.0.180.0060.00915.61
7.0.170.0060.00615.57
7.0.160.0070.00715.39
7.0.150.0110.00015.53
7.0.140.0070.04018.84
7.0.130.0030.00815.50
7.0.120.0030.00715.54
7.0.110.0000.00815.63
7.0.100.0070.00315.63
7.0.90.0040.00815.57
7.0.80.0040.00815.56
7.0.70.0060.00915.38
7.0.60.0110.03717.72
7.0.50.0040.04016.65
7.0.40.0060.02816.82
7.0.30.0060.02616.86
7.0.20.0150.04316.96
7.0.10.0050.04716.94
7.0.00.0040.02416.80
5.6.380.0060.00614.38
5.6.370.0120.00014.15
5.6.360.0000.01114.27
5.6.350.0040.00814.55
5.6.340.0070.01014.47
5.6.330.0120.00314.31
5.6.320.0040.00814.56
5.6.310.0080.00414.07
5.6.300.0070.00714.29
5.6.290.0000.00814.37
5.6.280.0050.04017.68
5.6.270.0040.01114.23
5.6.260.0060.00614.31
5.6.250.0040.00714.54
5.6.240.0100.00614.44
5.6.230.0030.00914.34
5.6.220.0040.00714.64
5.6.210.0050.02217.45
5.6.200.0060.02416.31
5.6.190.0080.04717.50
5.6.180.0190.04017.45
5.6.170.0110.02317.35
5.6.160.0030.03617.29
5.6.150.0090.02216.24
5.6.140.0090.03916.31
5.6.130.0040.03916.18
5.6.120.0090.02217.54
5.6.110.0040.04717.51
5.6.100.0040.04817.58
5.6.90.0020.02717.77
5.6.80.0030.02517.61
5.6.70.1980.02017.38
5.6.60.0090.00014.40
5.6.50.0000.01214.48
5.6.40.0040.01114.11
5.6.30.0000.00914.38
5.6.20.0030.01014.33
5.6.10.0060.00614.16
5.6.00.0070.00314.37
5.5.380.0040.00411.23
5.5.370.0050.00311.28
5.5.360.0070.00311.38
5.5.350.0050.05015.68
5.5.340.0030.04314.60
5.5.330.0070.03715.69
5.5.320.0150.03815.71
5.5.310.0190.03815.89
5.5.300.0050.02714.71
5.5.290.0030.03514.53
5.5.280.0080.04215.96
5.5.270.0030.04516.12
5.5.260.0030.02615.99
5.5.250.0100.04315.83
5.5.240.0200.03615.64
5.5.230.0000.01111.43
5.5.220.0030.00311.28
5.5.210.0040.00711.16
5.5.200.0060.00911.13
5.5.190.0030.00611.19
5.5.180.0040.00411.23
5.5.170.0050.00511.27
5.5.160.0050.00311.25
5.5.150.0060.00311.32
5.5.140.0050.00311.04
5.5.130.0040.00410.83
5.5.120.0080.00011.33
5.5.110.0070.00311.25
5.5.100.0060.00311.24
5.5.90.0030.00310.82
5.5.80.0000.00811.42
5.5.70.0000.01010.98
5.5.60.0000.00810.86
5.5.50.0040.01111.33
5.5.40.0040.00711.33
5.5.30.0030.01011.27
5.5.20.0000.01111.28
5.5.10.0040.00411.05
5.5.00.0050.00511.26
5.4.450.0380.03315.22
5.4.440.0470.02715.23
5.4.430.0080.03415.35
5.4.420.0380.03315.26
5.4.410.0390.02915.30
5.4.400.0180.02814.88
5.4.390.0200.03314.94
5.4.380.0120.03314.84
5.4.370.0030.03414.89
5.4.360.0120.02814.73
5.4.350.0130.02911.51
5.4.340.0070.02511.64
5.4.330.0000.01011.23
5.4.320.0040.02111.88
5.4.310.0050.02111.82
5.4.300.0050.02411.87
5.4.290.0040.02411.76
5.4.280.0030.02311.51
5.4.270.0040.02811.75
5.4.260.0020.02611.83
5.4.250.0120.02715.07
5.4.240.0050.02814.91
5.4.230.0130.02714.74
5.4.220.0120.02815.09
5.4.210.0080.02614.68
5.4.200.0070.02914.72
5.4.190.0100.02614.76
5.4.180.0080.02714.93
5.4.170.0050.03114.98
5.4.160.0070.02714.86
5.4.150.0050.04014.81
5.4.140.0080.02713.68
5.4.130.0150.02813.73
5.4.120.0110.03613.72
5.4.110.0100.02913.82
5.4.100.0080.03313.65
5.4.90.0070.02713.85
5.4.80.0080.02313.62
5.4.70.0140.02013.54
5.4.60.0070.02713.71
5.4.50.0100.02513.75
5.4.40.0080.03513.69
5.4.30.0050.03213.67
5.4.20.0100.02213.56
5.4.10.0090.02513.71
5.4.00.0070.02513.38
5.3.290.0060.02411.86
5.3.280.0080.03512.57
5.3.270.0080.03012.79
5.3.260.0100.03312.65
5.3.250.0020.03412.50
5.3.240.0060.04012.63
5.3.230.0050.02812.85
5.3.220.0050.02912.54
5.3.210.0050.03212.62
5.3.200.0080.03612.33
5.3.190.0070.02912.68
5.3.180.0110.03612.66
5.3.170.0100.02712.66
5.3.160.0070.03012.63
5.3.150.0070.02812.59
5.3.140.0100.03512.69
5.3.130.0080.02712.54
5.3.120.0050.03112.67
5.3.110.0060.03812.63
5.3.100.0060.02512.31
5.3.90.0070.03012.46
5.3.80.0030.03012.17
5.3.70.0020.03212.39
5.3.60.0050.02512.29
5.3.50.0070.02412.30
5.3.40.0080.02812.27
5.3.30.0130.01812.34
5.3.20.0050.03112.26
5.3.10.0080.03511.91
5.3.00.0080.03312.12
5.2.170.0050.02410.59
5.2.160.0050.03210.54
5.2.150.0080.01810.50
5.2.140.0070.01810.53
5.2.130.0050.02910.52
5.2.120.0070.02910.61
5.2.110.0050.02310.48
5.2.100.0070.02510.53
5.2.90.0070.02810.57
5.2.80.0020.03510.52
5.2.70.0060.02710.52
5.2.60.0010.02610.55
5.2.50.0050.02510.47
5.2.40.0030.02210.48
5.2.30.0070.02010.54
5.2.20.0020.02510.45
5.2.10.0030.02510.45
5.2.00.0050.02310.38
5.1.60.0020.0209.97
5.1.50.0050.01810.05
5.1.40.0020.02110.00
5.1.30.0030.02110.18
5.1.20.0060.01910.20
5.1.10.0050.02610.11
5.1.00.0030.0219.93
5.0.50.0050.0209.30
5.0.40.0040.0219.18
5.0.30.0020.0309.01
5.0.20.0050.0138.99
5.0.10.0010.0159.05
5.0.00.0020.0279.15
4.4.90.0030.0128.27
4.4.80.0050.0108.27
4.4.70.0000.0168.27
4.4.60.0000.0148.27
4.4.50.0040.0148.27
4.4.40.0030.0258.27
4.4.30.0030.0158.27
4.4.20.0040.0108.27
4.4.10.0000.0198.27
4.4.00.0050.0238.27
4.3.110.0020.0128.27
4.3.100.0010.0178.27
4.3.90.0020.0168.27
4.3.80.0050.0158.27
4.3.70.0000.0148.27
4.3.60.0000.0128.27
4.3.50.0030.0118.27
4.3.40.0010.0258.27
4.3.30.0060.0088.27
4.3.20.0010.0138.27
4.3.10.0030.0118.27
4.3.00.0080.0108.53

preferences:
52.7 ms | 401 KiB | 5 Q