3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateTimeExample = new DateTime('2009-01-05'); $dateTimes = [ $dateTimeExample->format('Y-m-d H:i:s'), $dateTimeExample->format('c'), $dateTimeExample->format('Y-m-d') ]; foreach($dateTimes as $datetime){ preg_match('~(?<date>\d{4}-\d{2}-\d{2})[\s|T](?<time>\d{2}:\d{2}:\d{2})?(?<timezone>[\+|-]\d{2}:\d{2})?~', $dateTime, $matches); $matches['time'] = array_key_exists('time', $matches) ? $matches['time'] : '00:00:00'; var_dump($matches); } //$dateTime = sprintf('%s %s %s', $matches['date'], $matches['time'], $matches['datetime']); //$bla = \DateTime::createFromFormat('Y-m-d H:i:s', $dateTime); //var_dump($bla);

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.0110.00718.93
8.3.50.0070.00716.88
8.3.40.0070.00719.36
8.3.30.0120.00319.27
8.3.20.0090.00020.21
8.3.10.0040.00421.79
8.3.00.0040.00420.95
8.2.180.0160.00318.79
8.2.170.0070.00722.96
8.2.160.0160.00322.06
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00420.56
8.2.120.0040.00426.35
8.2.110.0030.00720.52
8.2.100.0120.00018.16
8.2.90.0050.00319.36
8.2.80.0000.00818.05
8.2.70.0040.00418.13
8.2.60.0030.00518.05
8.2.50.0070.00318.10
8.2.40.0000.00822.46
8.2.30.0030.00621.09
8.2.20.0020.00518.13
8.2.10.0040.00418.13
8.2.00.0040.00418.23
8.1.280.0040.01825.92
8.1.270.0080.00022.09
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.68
8.1.230.0070.00719.07
8.1.220.0050.00317.78
8.1.210.0030.00518.77
8.1.200.0040.00717.60
8.1.190.0040.00417.61
8.1.180.0040.00418.10
8.1.170.0090.00618.32
8.1.160.0040.00419.09
8.1.150.0000.00820.77
8.1.140.0040.00419.73
8.1.130.0030.00319.00
8.1.120.0040.00417.86
8.1.110.0000.00817.84
8.1.100.0000.00717.83
8.1.90.0030.00617.87
8.1.80.0030.00517.67
8.1.70.0030.00517.86
8.1.60.0050.00517.90
8.1.50.0030.00517.84
8.1.40.0040.00417.71
8.1.30.0040.00417.95
8.1.20.0000.00817.95
8.1.10.0050.00317.82
8.1.00.0000.00817.77
8.0.300.0000.00718.77
8.0.290.0070.00017.25
8.0.280.0070.00018.40
8.0.270.0030.00517.37
8.0.260.0000.00617.29
8.0.250.0040.00417.27
8.0.240.0040.00517.18
8.0.230.0000.00717.42
8.0.220.0030.00517.22
8.0.210.0000.00817.20
8.0.200.0030.00317.26
8.0.190.0030.00617.29
8.0.180.0000.00817.34
8.0.170.0080.00017.36
8.0.160.0070.00017.36
8.0.150.0030.00317.30
8.0.140.0070.00017.18
8.0.130.0040.00413.67
8.0.120.0040.00417.29
8.0.110.0000.00817.30
8.0.100.0050.00317.38
8.0.90.0040.00417.36
8.0.80.0070.01017.37
8.0.70.0000.00817.14
8.0.60.0000.00717.29
8.0.50.0000.00817.26
8.0.30.0100.01017.49
8.0.20.0110.00817.44
8.0.10.0000.00817.38
8.0.00.0120.00617.32
7.4.330.0060.00015.55
7.4.320.0030.00316.82
7.4.300.0030.00316.77
7.4.290.0040.00416.72
7.4.280.0050.00316.86
7.4.270.0030.00316.85
7.4.260.0000.00716.89
7.4.250.0080.00016.91
7.4.240.0030.00316.89
7.4.230.0030.00317.07
7.4.220.0100.01317.07
7.4.210.0000.01416.81
7.4.200.0070.00017.06
7.4.160.0100.00716.97
7.4.150.0300.02217.40
7.4.140.0100.01017.86
7.4.130.0100.01117.02
7.4.120.0120.01116.95
7.4.110.0060.01316.75
7.4.100.0100.01317.01
7.4.90.0110.00716.97
7.4.80.0070.01019.39
7.4.70.0110.00916.93
7.4.60.0140.00316.90
7.4.50.0100.00416.90
7.4.40.0140.00316.99
7.4.30.0040.01916.93
7.4.00.0060.00915.46
7.3.330.0000.00613.62
7.3.320.0050.00013.52
7.3.310.0000.00616.63
7.3.300.0030.00316.72
7.3.290.0080.00816.70
7.3.280.0080.00716.68
7.3.270.0090.01117.40
7.3.260.0060.01116.92
7.3.250.0100.01016.84
7.3.240.0110.01016.77
7.3.230.0150.00416.97
7.3.210.0090.00916.86
7.3.200.0100.01016.74
7.3.190.0090.00616.87
7.3.180.0130.00716.84
7.3.170.0070.01016.81
7.3.160.0030.01316.71
7.2.330.0120.00617.11
7.2.320.0120.00616.94
7.2.310.0060.01316.93
7.2.300.0130.00417.07
7.2.290.0070.01016.91
7.2.90.0200.00715.14
7.2.80.0130.00615.29
7.2.70.2250.00715.45
7.2.60.0530.00915.66
7.2.50.0040.01715.21
7.2.40.0760.01015.29
7.2.30.0970.01115.47
7.2.20.0170.00715.54
7.2.10.2850.00615.29
7.2.00.0130.00315.62
7.1.210.1250.00714.43
7.1.200.1710.01314.40
7.1.190.0120.00614.45
7.1.180.0180.00914.25
7.1.170.0150.00914.16
7.1.160.0170.00714.49
7.1.150.0500.00314.31
7.1.140.1270.00914.07
7.1.130.0570.00314.25
7.1.120.0130.00614.32
7.1.110.0440.00914.23
7.1.100.0160.00814.34
7.1.90.0070.01114.34
7.1.80.1090.00914.16
7.1.70.3290.00614.39
7.1.60.1040.01332.30
7.1.50.0920.01732.38
7.1.40.1330.01332.27
7.1.30.0310.01132.19
7.1.20.0250.01132.24
7.1.10.0710.00614.29
7.1.00.2230.00714.42
7.0.310.0150.00614.03
7.0.300.0220.00314.09
7.0.290.0270.00713.93
7.0.280.0180.00713.93
7.0.270.0110.00513.72
7.0.260.1210.00413.89
7.0.250.0570.01013.69
7.0.240.0210.00914.02
7.0.230.0070.01114.11
7.0.220.0090.00913.88
7.0.210.3660.01013.86
7.0.200.1180.00913.87
7.0.190.0100.00613.88
7.0.180.0160.00913.91
7.0.170.0870.00713.74
7.0.160.0840.00714.04
7.0.150.0510.00313.98
7.0.140.0070.01113.93
7.0.130.0210.00314.00
7.0.120.0080.01213.69
7.0.110.0100.01013.71
7.0.100.2050.00313.79
7.0.90.0070.01013.87
7.0.80.1540.00014.03
7.0.70.0140.01014.11
7.0.60.0110.00713.99
7.0.50.0170.00314.06
7.0.40.1810.00313.94
7.0.30.0440.01214.18
7.0.20.1220.00314.12
7.0.10.1640.01013.94
7.0.00.0760.01013.92

preferences:
58.03 ms | 400 KiB | 5 Q