3v4l.org

run code in 300+ PHP versions simultaneously
<?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); Locale::setDefault('en_GB') $fmt = new IntlDateFormatter( Locale::getDefault(), IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'Formatted output is ' . $fmt->format(0);
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
Parse error: syntax error, unexpected '$fmt' (T_VARIABLE) in /in/SOd5C on line 15
Process exited with code 255.

preferences:
184.26 ms | 1395 KiB | 66 Q