fork download
  1. <?php
  2.  
  3. $str="20181107";
  4. $data = date("Y-m-d", strtotime($str));
  5.  
  6. echo $data;
Success #stdin #stdout 0s 82624KB
stdin
Standard input is empty
stdout
2018-11-07