3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tz = new DateTimeZone('America/Chicago'); $formatter = new \IntlDateFormatter('en_US', IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $tz, null, 'YYYY-MM-dd'); $date = new DateTime('2018-12-31', $tz); echo $formatter->format($date); // expected: 2018-12-31 // actual: 2019-12-31
based on tDplh
Output for 7.3.0alpha1 - 7.3.0beta1
Fatal error: Uncaught Error: Class 'IntlDateFormatter' not found in /in/krQR4:4 Stack trace: #0 {main} thrown in /in/krQR4 on line 4
Process exited with code 255.
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
2019-12-31