3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateFormat = new \IntlDateFormatter('ar_MO', \IntlDateFormatter::SHORT, \IntlDateFormatter::NONE); var_dump($dateFormat->getPattern()); var_dump($dateFormat->format(time())); var_dump($dateFormat->setPattern('d/M/y')); var_dump($dateFormat->format(time()));
based on 7uHem
Output for 7.2.0 - 7.2.31, 7.3.0 - 7.3.19, 7.4.0 - 7.4.7
string(11) "d‏/M‏/y" string(22) "٢٣‏/٦‏/٢٠٢٠" bool(true) string(16) "٢٣/٦/٢٠٢٠"