3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sourceFormat = 'd-m-Y'; $targetFormat = 'Y-m-d'; $value = '22-11-2017'; $datetime = \DateTime::createFromFormat($sourceFormat, $value, new \DateTimeZone('UTC')); $targetFormat = str_replace('%e', date('j', $datetime->getTimestamp()), $targetFormat); $output = strftime($targetFormat, $datetime->getTimestamp()); var_dump($output);

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.0100.00716.75
8.3.50.0140.00016.08
8.3.40.0140.00018.84
8.3.30.0090.00618.93
8.3.20.0040.00420.33
8.3.10.0000.00823.70
8.3.00.0050.00323.42
8.2.180.0070.00716.88
8.2.170.0070.00722.96
8.2.160.0100.00720.52
8.2.150.0050.00224.18
8.2.140.0020.00524.66
8.2.130.0080.00022.21
8.2.120.0040.00426.35
8.2.110.0030.00622.09
8.2.100.0080.00317.91
8.2.90.0090.00017.75
8.2.80.0000.00818.89
8.2.70.0040.00417.63
8.2.60.0050.00318.22
8.2.50.0000.00718.22
8.2.40.0040.00420.61
8.2.30.0040.00421.02
8.2.20.0070.00318.10
8.2.10.0000.01118.01
8.2.00.0000.00718.15
8.1.280.0040.01025.92
8.1.270.0000.00923.99
8.1.260.0050.00226.35
8.1.250.0000.00828.09
8.1.240.0090.00023.92
8.1.230.0120.00418.98
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0000.00917.48
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0060.00318.63
8.1.160.0040.00419.00
8.1.150.0060.00318.94
8.1.140.0040.00417.77
8.1.130.0030.00318.81
8.1.120.0000.00717.56
8.1.110.0000.00717.42
8.1.100.0040.00417.47
8.1.90.0000.00717.55
8.1.80.0080.00017.58
8.1.70.0040.00417.52
8.1.60.0000.00817.49
8.1.50.0080.00017.42
8.1.40.0000.01017.54
8.1.30.0040.00417.57
8.1.20.0000.00817.56
8.1.10.0080.00017.49
8.1.00.0040.00417.49
8.0.300.0020.00519.77
8.0.290.0080.00016.88
8.0.280.0000.00718.37
8.0.270.0030.00817.18
8.0.260.0030.00616.98
8.0.250.0030.00316.96
8.0.240.0030.00317.11
8.0.230.0000.00717.03
8.0.220.0070.00016.93
8.0.210.0070.00016.93
8.0.200.0000.00817.00
8.0.190.0040.00417.07
8.0.180.0040.00317.02
8.0.170.0000.00717.00
8.0.160.0030.00316.91
8.0.150.0030.00716.92
8.0.140.0000.00916.95
8.0.130.0000.00613.45
8.0.120.0080.00016.90
8.0.110.0030.00517.05
8.0.100.0000.00816.89
8.0.90.0040.00416.88
8.0.80.0090.01217.07
8.0.70.0030.00516.99
8.0.60.0050.00316.98
8.0.50.0020.00517.09
8.0.30.0150.00417.06
8.0.20.0090.01017.41
8.0.10.0050.00217.27
8.0.00.0070.01116.76
7.4.330.0030.00316.56
7.4.320.0000.00616.61
7.4.300.0030.00316.61
7.4.290.0000.00716.58
7.4.280.0070.00016.36
7.4.270.0070.00016.62
7.4.260.0030.00316.48
7.4.250.0000.00716.45
7.4.240.0060.00316.42
7.4.230.0000.00716.40
7.4.220.0120.00616.64
7.4.210.0060.00816.59
7.4.200.0030.00316.51
7.4.160.0080.00816.54
7.4.150.0080.00817.40
7.4.140.0110.00817.86
7.4.130.0090.00916.52
7.4.120.0100.00816.62
7.4.110.0100.01316.80
7.4.100.0070.01116.63
7.4.90.0130.00416.59
7.4.80.0100.00719.39
7.4.70.0090.00916.61
7.4.60.0070.01016.57
7.4.50.0030.01416.71
7.4.40.0080.01316.61
7.4.30.0060.00916.35
7.4.10.0070.01014.88
7.4.00.0050.01315.16
7.3.330.0000.00613.11
7.3.320.0000.00613.02
7.3.310.0030.00316.34
7.3.300.0000.00716.30
7.3.290.0080.00816.32
7.3.280.0040.01216.29
7.3.270.0140.00417.40
7.3.260.0080.01216.37
7.3.250.0110.00816.36
7.3.240.0120.00516.32
7.3.230.0120.00316.43
7.3.210.0070.01016.41
7.3.200.0120.00616.34
7.3.190.0060.00916.34
7.3.180.0140.00716.35
7.3.170.0070.01016.42
7.3.160.0030.01316.40
7.3.130.0030.01014.86
7.3.120.0130.00614.57
7.3.110.0030.00614.79
7.3.100.0000.01515.00
7.3.90.0030.01314.55
7.3.80.0060.00914.57
7.3.70.0090.00314.29
7.3.60.0090.00614.61
7.3.50.0040.01114.79
7.3.40.0070.00414.86
7.3.30.0080.00414.87
7.3.20.0060.00316.38
7.3.10.0090.00916.52
7.3.00.0050.00516.38
7.2.330.0070.01716.80
7.2.320.0030.01416.84
7.2.310.0070.01016.38
7.2.300.0070.01816.40
7.2.290.0120.00816.45
7.2.260.0070.01314.86
7.2.250.0030.01314.69
7.2.240.0000.01414.99
7.2.230.0100.00715.06
7.2.220.0090.00914.86
7.2.210.0090.00614.82
7.2.200.0070.01014.97
7.2.190.0030.01414.78
7.2.180.0120.00615.01
7.2.170.0080.00515.00
7.2.160.0030.00814.79
7.2.150.0070.00716.78
7.2.140.0090.00916.92
7.2.130.0080.00816.89
7.2.120.0070.01017.08
7.2.110.0130.00316.63
7.2.100.0090.00916.63
7.2.90.0030.01017.02
7.2.80.0030.01216.96
7.2.70.0150.00016.77
7.2.60.0030.00816.75
7.2.50.0000.01316.95
7.2.40.0040.01117.01
7.2.30.0100.00317.02
7.2.20.0030.01016.54
7.2.10.0170.00016.81
7.2.00.0100.00716.91
7.1.330.0060.00615.90
7.1.320.0100.00715.74
7.1.310.0070.00715.56
7.1.300.0030.00615.87
7.1.290.0060.01015.79
7.1.280.0120.00015.90
7.1.270.0000.01215.95
7.1.260.0030.01415.92
7.1.250.0040.00815.61
7.1.240.0060.00915.93
7.1.230.0090.00615.74
7.1.220.0000.01416.03
7.1.210.0090.00615.87
7.1.200.0070.00315.86
7.1.190.0030.01015.68
7.1.180.0040.00415.84
7.1.170.0060.00315.90
7.1.160.0070.00715.69
7.1.150.0110.00015.52
7.1.140.0090.00615.71
7.1.130.0070.00715.94
7.1.120.0000.00915.57
7.1.110.0050.00917.08
7.1.100.0090.00416.81
7.1.90.0050.01116.96
7.1.80.0090.00516.72
7.1.70.0040.01116.42
7.1.60.0130.00925.31
7.1.50.0090.01325.25
7.1.40.0130.00824.98
7.1.30.0110.01025.11
7.1.20.0130.01225.17
7.1.10.0050.00916.15
7.1.00.0090.00716.46
7.0.330.0000.01315.30
7.0.320.0000.01315.43
7.0.310.0000.01115.23
7.0.300.0000.00915.41
7.0.290.0030.01015.35
7.0.280.0030.01015.50
7.0.270.0090.00615.53
7.0.260.0120.00015.35
7.0.250.0050.00516.61
7.0.240.0060.00916.40
7.0.230.0040.00916.74
7.0.220.0050.00916.49
7.0.210.0020.01316.15
7.0.200.0060.00815.92
7.0.190.0030.01016.09
7.0.180.0080.00715.66
7.0.170.0050.00915.89
7.0.160.0090.00615.80
7.0.150.0030.01015.78
7.0.140.0000.01115.79
7.0.130.0080.00815.92
7.0.120.0070.00715.92
7.0.110.0100.00515.98
7.0.100.0020.01015.97
7.0.90.0060.00915.94
7.0.80.0080.00615.88
7.0.70.0070.00715.75
7.0.60.0060.00815.75
7.0.50.0020.01015.94
7.0.40.0060.01114.98
7.0.30.0090.00815.07
7.0.20.0080.00815.03
7.0.10.0050.00814.88
7.0.00.0030.01214.91
5.6.400.0060.00914.50
5.6.390.0060.00914.23
5.6.380.0030.00714.38
5.6.370.0040.00814.38
5.6.360.0100.00314.46
5.6.350.0070.00714.41
5.6.340.0000.01314.52
5.6.330.0110.00514.49
5.6.320.0080.00414.55
5.6.310.0030.01014.61
5.6.300.0110.00414.25
5.6.290.0030.00914.41
5.6.280.0070.00714.25
5.6.270.0030.00914.51
5.6.260.0060.01214.05
5.6.250.0040.01114.38
5.6.240.0030.00714.33
5.6.230.0030.00614.42
5.6.220.0000.01314.50
5.6.210.0060.00314.31
5.6.200.0060.00614.09
5.6.190.0060.00614.16
5.6.180.0040.00814.43
5.6.170.0040.00414.29
5.6.160.0070.00714.24
5.6.150.0070.00414.46
5.6.140.0100.00314.05
5.6.130.0060.00614.58
5.6.120.0040.00814.22
5.6.110.0030.01014.21
5.6.100.0060.01014.27
5.6.90.0070.00414.42
5.6.80.0090.00614.16
5.6.70.0040.01214.36
5.6.60.0080.00814.07
5.6.50.0040.01114.15
5.6.40.0070.00714.07
5.6.30.0000.01414.49
5.6.20.0030.01414.53
5.6.10.0070.01014.13
5.6.00.0060.00914.29

preferences:
60.25 ms | 400 KiB | 5 Q