3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Locale::setDefault('no_NO'); $fmt = new IntlDateFormatter( Locale::getDefault(), IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'Formatted output is ' . $fmt->format(0)."\n"; Locale::setDefault('en_GB'); $fmt = new IntlDateFormatter( Locale::getDefault(), IntlDateFormatter::LONG , IntlDateFormatter::LONG , 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'Formatted output is ' . $fmt->parse(0)."\n"; echo "with DateTime:\n\t", IntlDateFormatter::formatObject( new DateTime(date("Y-m-d")), IntlDateFormatter::LONG, Locale::getDefault()), "\n";
based on bir3W
Output for 7.0.20 - 7.2.0
Formatted output is onsdag 31. desember 1969 16:00:00 normaltid for den nordamerikanske Stillehavskysten Formatted output is with DateTime: 28 October 2015 at 00:00:00 CET
Output for 5.5.0 - 7.0.9
Formatted output is onsdag 31. desember 1969 16.00.00 normaltid for den nordamerikanske Stillehavskysten Formatted output is with DateTime: 28 October 2015 at 00:00:00 CET
Output for 5.4.0 - 5.4.45
Formatted output is onsdag 31. desember 1969 16.00.00 normaltid for den nordamerikanske Stillehavskysten Formatted output is with DateTime: Fatal error: Call to undefined method IntlDateFormatter::formatObject() in /in/G3dYo on line 25
Process exited with code 255.