- strtotime(Time value as string);
For example, if the string is '2025-04-27', write the code as follows:
- <?php
- $date = '2025-04-27';
- echo strtotime($date);
- ?>
So let's run the code above.
- <?php
- $date = '2025-04-27';
- echo strtotime($date);
- ?>
Here is the result screen: The time value keeps changing, so when you run it, it will output different values than the image.