3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale (LC_ALL, 'pt_BR'); // Try to create the datetime instance if ($date=DateTime::createFromFormat("d-M-y",strftime("%d-%b-%y","09-mai-17"))){ echo date_format($date,"Y/m/d"); } else { // It failed! Errors found, let's figure out what! echo "<pre>"; print_r(date_get_last_errors()); echo "</pre>"; }

preferences:
57.72 ms | 402 KiB | 5 Q