05 - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of 05.php

  1. <?php
  2. $original_date = "2024-01-25";
  3.  
  4. // Создание метки времени с заданной даты
  5. $timestamp = strtotime($original_date);
  6.  
  7. // Создание нового формата даты из этой отметки времени
  8. $new_date = date("d-m-Y", $timestamp);
  9. echo $new_date; // Выводит: 25-01-2024
  10. ?>
  11.  
File Description
  • 05
  • PHP Code
  • 25 Jan-2024
  • 345 Bytes
You can Share it: