3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('date.timezone', 'Asia/Tehran'); //same as IntlCalendar::fromDateTime(new DateTime(...)) $cal1 = IntlCalendar::fromDateTime('2016-10-28 17:43:02 Asia/Tehran'); //Note the timezone is Europe/Berlin, not the default Europe/Lisbon echo IntlDateFormatter::formatObject($cal1, 'yyyy MMMM d HH:mm:ss VVVV', 'fa_IR'), "\n";

preferences:
57.24 ms | 402 KiB | 5 Q