3v4l.org

run code in 300+ PHP versions simultaneously
<?php function converteData($format, $to_format, $time, $timezone = null) { $version = explode('.', phpversion()); if (!$timezone) { $timezone = new DateTimeZone(date_default_timezone_get()); } if ((int)$version[0] >= 5 && (int)$version[1] >= 2 && (int)$version[2] > 17) { $datetime = DateTime::createFromFormat($format, $time, $timezone); } else { $datetime = new DateTime(date($format, strtotime($time)), $timezone); } return $datetime->format($to_format); } var_dump(converteData('d-m-Y', 'd/m/Y H:i:s', '06-11-1992'));

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)
7.2.120.0030.01416.75
7.2.110.0000.01316.97
7.2.100.0110.00416.82
7.2.90.0030.01516.93
7.2.80.0040.00816.80
7.2.70.0000.01417.14
7.2.60.0040.01217.15
7.2.50.0100.00316.99
7.2.40.0120.00617.09
7.2.30.0070.00417.13
7.2.20.0030.00916.93
7.2.10.0030.01317.07
7.2.00.0150.00418.25
7.1.240.0100.00315.94
7.1.230.0040.01115.98
7.1.220.0000.01316.06
7.1.210.0030.01015.57
7.1.200.0070.00615.76
7.1.190.0070.00715.81
7.1.180.0000.01316.05
7.1.170.0040.01116.00
7.1.160.0000.01415.92
7.1.150.0070.00715.99
7.1.140.0000.01515.97
7.1.130.0100.00316.02
7.1.120.0100.00315.95
7.1.110.0000.00916.07
7.1.100.0030.00717.15
7.1.90.0060.00615.96
7.1.80.0060.00615.89
7.1.70.0030.00916.76
7.1.60.0070.01017.97
7.1.50.0060.01116.63
7.1.40.0030.01015.91
7.1.30.0000.01015.95
7.1.20.0000.01016.10
7.1.10.0060.00316.02
7.1.00.0050.03519.17
7.0.320.0060.00615.55
7.0.310.0040.00415.73
7.0.300.0030.00515.75
7.0.290.0000.01015.45
7.0.280.0070.00715.43
7.0.270.0030.01015.51
7.0.260.0090.00315.52
7.0.250.0080.00815.51
7.0.240.0040.00715.77
7.0.230.0000.00815.48
7.0.220.0070.00715.23
7.0.210.0060.00315.39
7.0.200.0020.01016.37
7.0.190.0100.00315.50
7.0.180.0030.00915.45
7.0.170.0060.00615.36
7.0.160.0000.01015.39
7.0.150.0040.01215.34
7.0.140.0070.04118.63
7.0.130.0150.00015.64
7.0.120.0100.00315.57
7.0.110.0110.00415.77
7.0.100.0080.02517.77
7.0.90.0070.03717.72
7.0.80.0070.04217.61
7.0.70.0070.03817.77
7.0.60.0030.04817.86
7.0.50.0100.04217.98
7.0.40.0050.04316.70
7.0.30.0130.03016.73
7.0.20.0090.02516.66
7.0.10.0070.04416.86
7.0.00.0080.02616.83
5.6.380.0070.00314.43
5.6.370.0090.00614.79
5.6.360.0060.00314.68
5.6.350.0080.00814.45
5.6.340.0030.01214.40
5.6.330.0030.00614.47
5.6.320.0060.00914.45
5.6.310.0000.01114.56
5.6.300.0030.00914.82
5.6.290.0070.00014.63
5.6.280.0070.03817.84
5.6.270.0000.01414.50
5.6.260.0050.00514.35
5.6.250.0030.03017.58
5.6.240.0080.02017.61
5.6.230.0080.04717.50
5.6.220.0090.03717.67
5.6.210.0050.04217.52
5.6.200.0030.05017.88
5.6.190.0100.02317.72
5.6.180.0100.04017.73
5.6.170.0080.03117.81
5.6.160.0070.03017.74
5.6.150.0110.02517.82
5.6.140.0050.05017.74
5.6.130.0080.04317.82
5.6.120.0070.03517.71
5.6.110.0090.02817.73
5.6.100.0050.04717.67
5.6.90.0100.03817.72
5.6.80.0100.03317.39
5.6.70.0070.04517.37
5.6.60.0080.03617.40
5.6.50.0100.03317.51
5.6.40.0020.02817.56
5.6.30.0100.04217.46
5.6.20.0100.04217.62
5.6.10.0130.04017.39
5.6.00.0080.02517.34
5.5.380.0060.02315.89
5.5.370.0060.04015.78
5.5.360.0090.03815.83
5.5.350.0070.04315.90
5.5.340.0030.04016.14
5.5.330.0000.03116.23
5.5.320.0100.02216.16
5.5.310.0020.03116.04
5.5.300.0070.04115.90
5.5.290.0070.03716.04
5.5.280.0060.03816.18
5.5.270.0080.03016.06
5.5.260.0030.02916.15
5.5.250.0050.03716.08
5.5.240.0080.04315.86
5.5.230.0060.02815.83
5.5.220.0050.04715.90
5.5.210.0180.02815.84
5.5.200.0030.02915.68
5.5.190.0090.02515.66
5.5.180.0070.04215.81
5.5.170.0030.01314.17
5.5.160.0110.03815.76
5.5.150.0110.03815.80
5.5.140.0070.04215.80
5.5.130.0080.02415.78
5.5.120.0030.03215.77
5.5.110.0110.02915.81
5.5.100.0050.02815.78
5.5.90.0100.04115.71
5.5.80.0050.02515.65
5.5.70.0060.03115.81
5.5.60.0150.02215.61
5.5.50.0030.04415.65
5.5.40.0100.03815.76
5.5.30.0070.02515.56
5.5.20.0100.03515.68
5.5.10.0050.04515.82
5.5.00.0080.04015.55
5.4.450.0050.02715.27
5.4.440.0070.04315.35
5.4.430.0090.03615.46
5.4.420.0050.03815.44
5.4.410.0060.03215.29
5.4.400.0040.04015.06
5.4.390.0070.03815.19
5.4.380.0080.03115.06
5.4.370.0030.04215.21
5.4.360.0050.04015.09
5.4.350.0080.02515.06
5.4.340.0050.03815.05
5.4.330.0100.00011.07
5.4.320.0030.03815.21
5.4.310.0050.04415.18
5.4.300.0100.02814.96
5.4.290.0020.04415.21
5.4.280.0060.03715.16
5.4.270.0050.02015.22
5.4.260.0020.03615.18
5.4.250.0070.03515.11
5.4.240.0070.03615.14
5.4.230.0050.04215.04
5.4.220.0080.04115.15
5.4.210.0070.03815.12
5.4.200.0030.04215.10
5.4.190.0100.03515.17
5.4.180.0030.02315.15
5.4.170.0030.04515.16
5.4.160.0050.02615.06
5.4.150.0020.04415.16
5.4.140.0030.03713.70
5.4.130.0140.03213.72
5.4.120.0060.02313.72
5.4.110.0070.04213.86
5.4.100.0080.03913.79
5.4.90.0050.03513.72
5.4.80.0050.04213.85
5.4.70.0110.01813.70
5.4.60.0100.03813.74
5.4.50.0080.02313.82
5.4.40.0030.02113.77
5.4.30.0090.03313.87
5.4.20.0060.01713.76
5.4.10.0050.02013.82
5.4.00.0080.03513.51
5.3.290.0040.04412.92
5.3.280.0020.04412.79
5.3.270.0070.02412.87
5.3.260.0050.03612.90
5.3.250.0060.03912.86
5.3.240.0080.03912.81
5.3.230.0050.04212.88
5.3.220.0050.03512.88
5.3.210.0070.03612.85
5.3.200.0050.02612.80
5.3.190.0080.03812.82
5.3.180.0110.02912.85
5.3.170.0050.03712.86
5.3.160.0070.03212.83
5.3.150.0070.02312.84
5.3.140.0050.02312.78
5.3.130.0060.03012.81
5.3.120.0080.03612.79
5.3.110.0020.02212.80
5.3.100.0060.03512.63
5.3.90.0050.03512.59
5.3.80.0060.04012.60
5.3.70.0050.02212.58
5.3.60.0040.02012.50
5.3.50.0070.03812.54
5.3.40.0140.03212.52
5.3.30.0070.03812.45
5.3.20.0060.03712.43
5.3.10.0020.02712.42
5.3.00.0070.01812.42
5.2.170.0000.04011.18
5.2.160.0040.03611.17
5.2.150.0030.01811.17
5.2.140.0050.03311.17
5.2.130.0050.03411.17
5.2.120.0060.02511.17
5.2.110.0050.03311.17
5.2.100.0030.02811.17
5.2.90.0070.03211.17
5.2.80.0020.02311.17
5.2.70.0000.02111.17
5.2.60.0060.02011.17
5.2.50.0000.02711.17
5.2.40.0030.02011.17
5.2.30.0030.03011.17
5.2.20.0080.01611.17
5.2.10.0030.03611.17
5.2.00.0020.02211.17
5.1.60.0000.02211.17
5.1.50.0020.02211.17
5.1.40.0060.01711.17
5.1.30.0060.02111.17
5.1.20.0060.01511.17
5.1.10.0030.02711.17
5.1.00.0040.02911.17
5.0.50.0070.02511.17
5.0.40.0040.02311.17
5.0.30.0030.02511.17
5.0.20.0040.01511.17
5.0.10.0050.02211.17
5.0.00.0020.03311.17
4.4.90.0000.01911.17
4.4.80.0020.01211.17
4.4.70.0050.01711.17
4.4.60.0020.01511.17
4.4.50.0050.00811.17
4.4.40.0010.02811.17
4.4.30.0000.01811.17
4.4.20.0000.02011.17
4.4.10.0020.01311.17
4.4.00.0050.02611.17
4.3.110.0030.02211.17
4.3.100.0070.01311.17
4.3.90.0030.01711.17
4.3.80.0020.02711.17
4.3.70.0030.01811.17
4.3.60.0000.01911.17
4.3.50.0050.01711.17
4.3.40.0030.02011.17
4.3.30.0010.01511.17
4.3.20.0000.02211.17
4.3.10.0030.01511.17
4.3.00.0020.01511.17

preferences:
45.1 ms | 401 KiB | 5 Q