3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formatter = new IntlDateFormatter( 'ja_JP@calendar=japanese', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'Europe/Madrid', IntlDateFormatter::TRADITIONAL, 'Gy年M月' ); $str = "令和元年8月"; $new = mb_ereg_replace($str , "令和元年" , "2019年"); echo $new; $ts = $formatter->parse($new); //$ts = $formatter->parse('令和元年8月'); var_dump($ts, date('Y-m', $ts));
Output for git.master, git.master_jit, rfc.property-hooks
2019年bool(false) string(7) "1970-01"

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:
62.68 ms | 401 KiB | 8 Q