3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "2019-08-10D00:00:03.712125000"; $parts = explode(".", $string); $microseconds = $parts[1]; $date = DateTime::createFromFormat("Y-m-d\DH:i:s", $parts[0]); $timestamp = $date->getTimestamp(); // If you want to round it to 4 decimal places // $microseconds = ltrim(round("0.".$microseconds, 4), "0."); // If you want to append the microseconds back for whichever reason // $timestamp .= ".".$microseconds; echo $timestamp;

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.4.10.0090.00018.05
8.3.140.0040.00418.12
8.3.130.0050.00318.21
8.3.120.0150.00318.91
8.3.110.0030.00620.94
8.3.100.0040.00424.06
8.3.90.0120.00326.77
8.3.80.0090.00017.97
8.3.70.0150.00618.43
8.3.60.0150.00618.43
8.3.50.0130.00521.26
8.3.40.0040.01118.95
8.3.30.0170.00318.70
8.3.20.0090.00022.74
8.3.10.0000.00820.21
8.3.00.0000.00823.70
8.2.260.0070.00316.43
8.2.250.0080.00016.79
8.2.240.0090.00617.46
8.2.230.0040.00422.58
8.2.220.0040.01537.54
8.2.210.0080.00026.77
8.2.200.0050.00518.06
8.2.190.0140.00716.58
8.2.180.0070.01018.41
8.2.170.0060.00922.96
8.2.160.0100.00320.45
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.75
8.2.110.0000.00919.13
8.2.100.0080.00417.97
8.2.90.0080.00017.75
8.2.80.0050.00319.03
8.2.70.0000.00817.88
8.2.60.0040.00417.88
8.2.50.0030.00818.07
8.2.40.0030.00618.41
8.2.30.0040.00418.25
8.2.20.0000.00718.09
8.2.10.0000.00719.41
8.2.00.0030.00619.25
8.1.310.0120.00616.88
8.1.300.0120.00618.68
8.1.290.0040.00818.88
8.1.280.0080.00825.92
8.1.270.0050.00323.90
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0080.00322.13
8.1.230.0000.01120.91
8.1.220.0080.00018.81
8.1.210.0040.00418.77
8.1.200.0030.00617.36
8.1.190.0070.00317.35
8.1.180.0030.00618.10
8.1.170.0060.00318.65
8.1.160.0000.00818.89
8.1.150.0040.00418.87
8.1.140.0000.00720.92
8.1.130.0070.00017.41
8.1.120.0030.00317.51
8.1.110.0030.00617.52
8.1.100.0050.00217.41
8.1.90.0040.00417.50
8.1.80.0030.00617.41
8.1.70.0000.00717.54
8.1.60.0000.00817.57
8.1.50.0000.00817.51
8.1.40.0060.00317.45
8.1.30.0040.00417.56
8.1.20.0040.00417.58
8.1.10.0030.00517.55
8.1.00.0040.00417.55
8.0.300.0070.00019.93
8.0.290.0050.00316.88
8.0.280.0000.00718.48
8.0.270.0000.00817.05
8.0.260.0050.00317.07
8.0.250.0040.00417.14
8.0.240.0030.00317.18
8.0.230.0000.00716.97
8.0.220.0030.00317.00
8.0.210.0000.00717.07
8.0.200.0000.00717.02
8.0.190.0030.00316.96
8.0.180.0070.00017.07
8.0.170.0060.00317.06
8.0.160.0070.00016.99
8.0.150.0040.00416.94
8.0.140.0000.00817.05
8.0.130.0050.00013.36
8.0.120.0030.00517.03
8.0.110.0050.00317.02
8.0.100.0070.00016.97
8.0.90.0080.00016.90
8.0.80.0100.00717.03
8.0.70.0070.00017.07
8.0.60.0030.00516.96
8.0.50.0070.00016.84
8.0.30.0130.00717.26
8.0.20.0070.01217.06
8.0.10.0000.00817.21
8.0.00.0120.01116.86
7.4.330.0000.00516.84
7.4.320.0070.00016.38
7.4.300.0030.00316.60
7.4.290.0000.00716.55
7.4.280.0000.00716.48
7.4.270.0040.00416.62
7.4.260.0000.00613.25
7.4.250.0000.00716.58
7.4.240.0040.00416.54
7.4.230.0070.00016.71
7.4.220.0020.00516.63
7.4.210.0060.01016.65
7.4.200.0030.00316.50
7.4.130.0140.00716.53
7.4.120.0160.00616.60
7.4.110.0080.00816.86
7.4.100.0110.01216.63
7.4.90.0090.00916.62
7.4.80.0090.00619.39
7.4.70.0000.01716.59
7.4.60.0110.01116.57
7.4.50.0000.01916.45
7.4.40.0060.01016.30
7.4.00.0050.01114.82
7.3.330.0030.00316.42
7.3.320.0030.00313.17
7.3.310.0000.00716.43
7.3.300.0030.00316.33
7.3.290.0030.00316.36
7.3.260.0100.01116.52
7.3.240.0120.00716.55
7.3.230.0120.00616.51
7.3.210.0140.00616.59
7.3.200.0130.00416.32
7.3.190.0120.00916.56
7.3.180.0070.00816.61
7.3.170.0040.01316.65
7.3.160.0110.00516.45
7.3.120.0100.01014.84
7.3.110.0070.01114.76
7.3.100.0100.00715.08
7.3.90.0060.00914.75
7.3.80.0070.00914.79
7.3.70.0140.00215.00
7.3.60.0060.00614.94
7.3.50.0060.00514.87
7.3.40.0020.01314.76
7.3.30.0100.00714.96
7.3.20.0140.00015.80
7.3.10.0110.00215.62
7.3.00.0090.00715.78
7.2.330.0070.01016.89
7.2.320.0100.00716.42
7.2.310.0160.00616.28
7.2.300.0080.00816.81
7.2.290.0130.00316.75
7.2.250.0060.01314.48
7.2.240.0120.00615.12
7.2.230.0060.01214.96
7.2.220.0070.00715.10
7.2.210.0040.01014.81
7.2.200.0050.00815.12
7.2.190.0040.00915.00
7.2.180.0090.00514.96
7.2.170.0070.00715.09
7.2.160.0060.00614.94
7.2.150.0160.00315.29
7.2.140.0110.00415.26
7.2.130.0030.01215.14
7.2.120.0160.00314.90
7.2.110.0140.00915.24
7.2.100.0190.00314.77
7.2.90.0180.00015.18
7.2.80.0100.00515.09
7.2.70.0060.01315.02
7.2.60.0090.00914.95
7.2.50.0100.00714.96
7.2.40.0810.00714.71
7.2.30.0150.00014.98
7.2.20.0130.00614.56
7.2.10.0120.00315.01
7.2.00.0160.00314.86
7.1.330.0070.00715.62
7.1.320.0040.00815.68
7.1.310.0030.00915.04
7.1.300.0090.00715.10
7.1.290.0070.00915.04
7.1.280.0100.00615.00
7.1.270.0050.01114.96
7.1.260.0050.01014.90
7.1.250.0120.00914.18

preferences:
30.49 ms | 403 KiB | 5 Q