<?php $string_data = 'September 18, 2018'; $data_objeto = new DateTime($string_data); print_r($data_objeto); $data_formatada = date('d/m/Y', strtotime($string_data)); print_r($data_formatada);
Standard input is empty
DateTime Object ( [date] => 2018-09-18 00:00:00.000000 [timezone_type] => 3 [timezone] => UTC ) 18/09/2018
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!