3v4l.org

run code in 300+ PHP versions simultaneously
<?php $DateTime = new \DateTime('2018-5-30'); $formatter = new IntlDateFormatter('en-US', IntlDateFormatter::SHORT, IntlDateFormatter::NONE, 'Europe/Berlin'); $format = $formatter->getPattern(); echo $format . "\r\n"; $formattedDateTime = $formatter->format($DateTime); echo $formattedDateTime . "\r\n"; $date = DateTime::createFromFormat($format, $formattedDateTime); var_dump($date); var_dump(DateTime::getLastErrors()); echo $date->format('Y-m-d');
Output for git.master, git.master_jit
M/d/yy 5/30/18 bool(false) array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(3) ["errors"]=> array(2) { [0]=> string(40) "The separation symbol could not be found" [4]=> string(22) "Unexpected data found." } } Fatal error: Uncaught Error: Call to a member function format() on bool in /in/YsZSK:17 Stack trace: #0 {main} thrown in /in/YsZSK on line 17
Process exited with code 255.
Output for rfc.property-hooks
M/d/yy 5/30/18 bool(false) array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(3) ["errors"]=> array(2) { [0]=> string(40) "The separation symbol could not be found" [4]=> string(22) "Unexpected data found." } } Fatal error: Uncaught Error: Call to a member function format() on false in /in/YsZSK:17 Stack trace: #0 {main} thrown in /in/YsZSK on line 17
Process exited with code 255.

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:
19.28 ms | 401 KiB | 8 Q