3v4l.org

run code in 300+ PHP versions simultaneously
<?php function converterData($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(converterData('Y-m-d', 'd/m/Y', '2013-02-28'));

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.1.70.0180.00617.27
7.1.60.0100.00319.82
7.1.50.0130.01017.04
7.1.00.0170.06322.54
7.0.200.0000.00816.88
7.0.140.0070.07022.15
7.0.100.0070.05320.04
7.0.90.0030.04021.81
7.0.80.0130.07021.69
7.0.70.0070.04321.70
7.0.60.0000.07021.90
7.0.50.0100.08022.10
7.0.40.0070.05720.09
7.0.30.0070.04720.14
7.0.20.0070.08320.08
7.0.10.0130.07720.07
7.0.00.0130.08020.08
5.6.280.0030.07021.08
5.6.250.0070.06020.82
5.6.240.0030.05320.59
5.6.230.0000.06020.75
5.6.220.0100.07720.62
5.6.210.0030.07320.61
5.6.200.0230.06720.97
5.6.190.0030.09320.91
5.6.180.0070.08021.11
5.6.170.0100.07721.17
5.6.160.0030.08320.94
5.6.150.0030.08720.94
5.6.140.0100.08321.06
5.6.130.0130.08021.13
5.6.120.0070.05321.08
5.6.110.0070.08021.00
5.6.100.0100.05321.07
5.6.90.0070.08721.06
5.6.80.0130.03720.43
5.6.70.0100.07720.39
5.6.60.0170.07020.45
5.6.50.0070.08020.43
5.6.40.0100.04720.30
5.6.30.0070.08320.53
5.6.20.0100.04020.40
5.6.10.0130.07020.39
5.6.00.0070.08020.45
5.5.380.0070.04320.46
5.5.370.0100.07320.41
5.5.360.0070.05720.50
5.5.350.0070.08720.46
5.5.340.0100.08020.92
5.5.330.0070.07320.82
5.5.320.0030.04320.86
5.5.310.0030.07320.78
5.5.300.0000.05020.91
5.5.290.0070.07720.76
5.5.280.0000.07320.75
5.5.270.0070.08020.88
5.5.260.0030.05720.91
5.5.250.0070.07020.73
5.5.240.0070.04720.30
5.5.230.0100.07720.17
5.5.220.0100.07320.26
5.5.210.0200.06320.21
5.5.200.0070.07020.28
5.5.190.0130.07020.23
5.5.180.0100.04720.27
5.5.160.0030.08320.23
5.5.150.0100.07320.17
5.5.140.0030.08020.21
5.5.130.0070.07720.10
5.5.120.0130.04020.24
5.5.110.0000.07320.26
5.5.100.0070.07320.07
5.5.90.0100.07320.15
5.5.80.0100.04020.07
5.5.70.0100.06719.94
5.5.60.0100.07719.96
5.5.50.0130.06020.16
5.5.40.0100.07320.14
5.5.30.0000.08319.93
5.5.20.0070.07720.05
5.5.10.0100.07320.12
5.5.00.0100.04319.96
5.4.450.0130.07319.27
5.4.440.0000.08319.37
5.4.430.0070.08019.45
5.4.420.0000.08719.27
5.4.410.0070.05319.33
5.4.400.0030.04319.13
5.4.390.0070.07719.05
5.4.380.0070.08019.21
5.4.370.0030.08019.04
5.4.360.0100.07319.21
5.4.350.0200.06719.21
5.4.340.0000.05019.13
5.4.320.0070.07319.05
5.4.310.0070.08019.03
5.4.300.0100.03719.04
5.4.290.0030.04019.03
5.4.280.0100.06719.04
5.4.270.0030.04719.10
5.4.260.0070.07019.18
5.4.250.0030.07319.12
5.4.240.0070.06719.02
5.4.230.0030.07019.02
5.4.220.0030.07318.84
5.4.210.0030.05718.84
5.4.200.0070.07719.13
5.4.190.0000.05719.02
5.4.180.0130.07019.04
5.4.170.0030.07318.83
5.4.160.0030.07719.12
5.4.150.0070.04319.16
5.4.140.0070.07016.33
5.4.130.0000.05716.46
5.4.120.0000.04716.40
5.4.110.0070.06316.43
5.4.100.0070.04016.39
5.4.90.0200.02316.36
5.4.80.0170.06016.43
5.4.70.0130.07316.46
5.4.60.0030.07016.32
5.4.50.0070.04016.44
5.4.40.0000.07316.54
5.4.30.0070.07316.36
5.4.20.0130.06316.24
5.4.10.0030.04316.36
5.4.00.0000.07015.94
5.3.290.0070.07714.64
5.3.280.0030.07714.54
5.3.270.0000.08014.68
5.3.260.0030.06714.61
5.3.250.0030.07714.76
5.3.240.0100.03714.66
5.3.230.0130.07014.71
5.3.220.0100.07014.63
5.3.210.0100.07014.54
5.3.200.0100.06014.53
5.3.190.0030.07714.50
5.3.180.0030.05714.70
5.3.170.0000.05014.54
5.3.160.0130.04014.61
5.3.150.0000.05714.59
5.3.140.0000.07714.48
5.3.130.0070.05014.68
5.3.120.0030.07314.64
5.3.110.0170.07014.63
5.3.100.0030.08014.11
5.3.90.0070.04313.94
5.3.80.0100.07714.16
5.3.70.0070.07014.00
5.3.60.0030.04314.07
5.3.50.0070.03713.88
5.3.40.0030.07713.88
5.3.30.0070.07013.89
5.3.20.0100.06013.75
5.3.10.0100.05013.63
5.3.00.0100.07013.66
5.2.170.0030.06311.02
5.2.160.0030.04311.28
5.2.150.0030.04711.26
5.2.140.0070.06011.25
5.2.130.0070.05711.12
5.2.120.0030.04011.09
5.2.110.0070.05711.00
5.2.100.0100.02711.03
5.2.90.0070.05710.99
5.2.80.0030.06311.02
5.2.70.0070.05711.00
5.2.60.0000.04310.98
5.2.50.0030.06310.93
5.2.40.0070.05711.02
5.2.30.0030.06010.97
5.2.20.0100.05010.99
5.2.10.0070.05710.83
5.2.00.0000.06310.73
5.1.60.0100.0509.99
5.1.50.0130.04310.11
5.1.40.0100.06010.05
5.1.30.0030.05710.20
5.1.20.0100.05310.47
5.1.10.0030.05710.15
5.1.00.0000.05310.10
5.0.50.0070.0409.16
5.0.40.0030.0409.16
5.0.30.0030.0579.16
5.0.20.0030.0409.16
5.0.10.0030.0409.16
5.0.00.0000.0439.16
4.4.90.0070.0309.16
4.4.80.0000.0339.16
4.4.70.0070.0309.16
4.4.60.0070.0309.16
4.4.50.0000.0379.16
4.4.40.0000.0379.16
4.4.30.0030.0339.16
4.4.20.0070.0279.16
4.4.10.0070.0309.16
4.4.00.0070.0479.16
4.3.110.0000.0209.16
4.3.100.0070.0209.16
4.3.90.0030.0209.16
4.3.80.0030.0239.16
4.3.70.0000.0339.16
4.3.60.0000.0339.16
4.3.50.0070.0309.16
4.3.40.0000.0439.16
4.3.30.0030.0139.16
4.3.20.0000.0179.16
4.3.10.0000.0379.16
4.3.00.0000.0379.16

preferences:
34.98 ms | 401 KiB | 5 Q