3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(null, new DateTimeZone('Europe/London')); $france = new \IntlDateFormatter( 'fr_FR', \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, $date->getTimezone() ); $uk = new \IntlDateFormatter( 'en_GB', \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, $date->getTimezone() ); echo $france->format($date) . PHP_EOL; echo $uk->format($date) . PHP_EOL;
based on BchV7
Output for 5.6.0 - 5.6.30, hhvm-3.10.1, 7.0.0 - 7.2.0
20150917 11:44 AM 20150917 11:44 am
Output for hhvm-3.11.1 - 3.17.3
Fatal error: Uncaught exception 'Exception' with message '__construct() expects parameter 1 to be string, null given' in /in/DKD7P:3 Stack trace: #0 /in/DKD7P(3): DateTime->__construct() #1 {main}
Process exited with code 255.
Output for 5.5.0 - 5.5.38
Fatal error: Class 'IntlDateFormatter' not found in /in/DKD7P on line 5
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Warning: IntlDateFormatter::__construct() expects parameter 4 to be string, object given in /in/DKD7P on line 10 Warning: IntlDateFormatter::__construct() expects parameter 4 to be string, object given in /in/DKD7P on line 17 Fatal error: Call to a member function format() on a non-object in /in/DKD7P on line 19
Process exited with code 255.