3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '2017-11-29T15:10:24.123+01:00'; $format = \DateTime::RFC3339_EXTENDED; // 'Y-m-d\TH:i:s.vP' $date = new \DateTime($string); $parsed = \DateTime::createFromFormat( $date->format($format), $format ); var_dump($string); var_dump($date->format($format)); echo "\n"; var_dump($date); var_dump($parsed); echo "\n"; echo "\n"; var_dump(\DateTime::getLastErrors());
Output for git.master, git.master_jit
string(29) "2017-11-29T15:10:24.123+01:00" string(29) "2017-11-29T15:10:24.123+01:00" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-11-29 15:10:24.123000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" } bool(false) array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(12) ["errors"]=> array(10) { [0]=> string(35) "The format separator does not match" [1]=> string(35) "The format separator does not match" [2]=> string(35) "The format separator does not match" [3]=> string(35) "The format separator does not match" [4]=> string(35) "The format separator does not match" [5]=> string(35) "The format separator does not match" [6]=> string(35) "The format separator does not match" [7]=> string(35) "The format separator does not match" [8]=> string(47) "The timezone could not be found in the database" [15]=> string(43) "Not enough data available to satisfy format" } }
Output for rfc.property-hooks
string(29) "2017-11-29T15:10:24.123+01:00" string(29) "2017-11-29T15:10:24.123+01:00" object(DateTime)#1 (3) { ["date"]=> string(26) "2017-11-29 15:10:24.123000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" } bool(false) array(4) { ["warning_count"]=> int(0) ["warnings"]=> array(0) { } ["error_count"]=> int(19) ["errors"]=> array(15) { [0]=> string(35) "The format separator does not match" [1]=> string(35) "The format separator does not match" [2]=> string(35) "The format separator does not match" [3]=> string(35) "The format separator does not match" [4]=> string(35) "The format separator does not match" [5]=> string(35) "The format separator does not match" [6]=> string(35) "The format separator does not match" [7]=> string(35) "The format separator does not match" [8]=> string(35) "The format separator does not match" [9]=> string(35) "The format separator does not match" [11]=> string(35) "The format separator does not match" [12]=> string(35) "The format separator does not match" [13]=> string(35) "The format separator does not match" [14]=> string(35) "The format separator does not match" [15]=> string(43) "Not enough data available to satisfy format" } }

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:
57.22 ms | 404 KiB | 8 Q