fork download
  1. <?php
  2.  
  3. $xml = "<data-hora>2015-11-10T11:33:41.086-02:00</data-hora>";
  4. $xml = str_replace("<data-hora>", "", $xml);
  5. $respDataHora = str_replace("</data-hora>", "", $xml);
  6. $respData = substr($respDataHora, 0, 10);
  7. $respHora = substr($respDataHora, 11,8);
  8. echo $respDataHora . '<br>';
  9. echo $respData . '<br>';
  10. echo $respHora . '<br>';
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
2015-11-10T11:33:41.086-02:00<br>2015-11-10<br>11:33:41<br>