3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateTime = '2009-13-11 99:88:56'; 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'; $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)
7.2.90.1020.00314.64
7.2.80.0880.00014.68
7.2.70.1000.00714.93
7.2.60.1490.01714.88
7.2.50.1060.00014.70
7.2.40.1250.00414.86
7.2.30.1220.01314.66
7.2.20.0960.01314.63
7.2.10.0950.00014.97
7.2.00.1010.00714.66
7.1.210.1270.00713.52
7.1.200.1570.00013.53
7.1.190.1210.00613.72
7.1.180.1800.00713.57
7.1.170.1100.00713.48
7.1.160.1120.00613.60
7.1.150.1460.01013.67
7.1.140.1290.01313.80
7.1.130.0820.00613.70
7.1.120.0190.01313.57
7.1.110.0470.01313.41
7.1.100.0290.01113.70
7.1.90.0530.00713.65
7.1.80.0290.00713.75
7.1.70.0570.01413.65
7.1.60.0270.00931.92
7.1.50.1040.00331.97
7.1.40.1180.01031.69
7.1.30.1070.01031.86
7.1.20.0450.00431.43
7.1.10.0640.01413.81
7.1.00.0250.01613.71
7.0.310.0780.01313.39
7.0.300.1140.00613.09
7.0.290.1080.00613.51
7.0.280.0950.01013.11
7.0.270.1110.01013.25
7.0.260.0940.00313.37
7.0.250.0330.01013.06
7.0.240.0080.00813.38
7.0.230.0130.00313.26
7.0.220.0000.02013.48
7.0.210.0120.00413.46
7.0.200.0800.00613.41
7.0.190.0080.01513.21
7.0.180.1190.00313.20
7.0.170.1890.01313.54
7.0.160.0070.00713.44
7.0.150.0840.00313.29
7.0.140.0900.00713.34
7.0.130.1100.00313.36
7.0.120.0110.00413.29
7.0.110.0130.00513.31
7.0.100.1040.00313.47
7.0.90.1120.00313.11
7.0.80.1440.00613.43
7.0.70.0160.00513.29
7.0.60.0280.00813.28
7.0.50.0090.00913.50
7.0.40.0130.01113.37
7.0.30.1670.00913.52
7.0.20.1010.00313.36
7.0.10.0310.00613.52
7.0.00.0110.00813.20

preferences:
139.9 ms | 1394 KiB | 7 Q