3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function converteData($format, $to_format, $time, $timezone = null) { if (!$timezone) { $timezone = new DateTimeZone(date_default_timezone_get()); } $d = date_create_from_format($format, $date, $timezone); return date_format($d, $to_format); }
Output for 4.3.0 - 7.2.0