3v4l.org

run code in 500+ PHP versions simultaneously
<?php $validDateTimeStringsAccordingToIso8601 = [ '20230328T070000.000Z', // a basic format containing a microsecond fraction '2023-03-28T07:00:00.000Z', // The exact sme as extended format '20230328T07.5Z' // a basic format describing 7:30 according to ISO ]; foreach ($validDateTimeStringsAccordingToIso8601 as $dateTime) { try { $d = new DateTimeImmutable($dateTime); echo $d->format('c') . PHP_EOL; } catch (Throwable $t) { echo $t . PHP_EOL; } }
Output for rfc.property-hooks
DateMalformedStringException: Failed to parse time string (20230328T070000.000Z) at position 16 (0): Unexpected character in /in/ZJt06:11 Stack trace: #0 /in/ZJt06(11): DateTimeImmutable->__construct('20230328T070000...') #1 {main} 2023-03-28T07:00:00+00:00 2023-03-28T07:05:00+00:00
Output for git.master, git.master_jit
Exception: Failed to parse time string (20230328T070000.000Z) at position 16 (0): Unexpected character in /in/ZJt06:11 Stack trace: #0 /in/ZJt06(11): DateTimeImmutable->__construct('20230328T070000...') #1 {main} 2023-03-28T07:00:00+00:00 2023-03-28T07:05:00+00:00

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.54 ms | 1139 KiB | 4 Q