How to calculate the difference between two dates
$datetime1 = new DateTime('2020-10-11 16:52:52');
$datetime2 = new DateTime('2020-10-13 16:52:52');
$interval = $datetime1->diff($datetime2);
echo $interval->format('%a days');
Also in PHP:
- check type of variable in php
- catch new exception php
- clear cache terminal laravel
- base64_decode laravel
- clear cache in laravel in windows cmd
- Warning: file_get_contents(): SSL operation failed with code 1
- clear all laravel caches
- Your Composer dependencies require a PHP version ">= 7.2.5". You are running 7.2.0. in
- base64 php decode with password
- DependencyResolver/RuleSet.php on line 84
- Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:cer
- download and install laveral
- current data in php
- catch exception php of spetie
- create laravel project in laravel/laravel
- check if string contains a character php
- 6 digit alphanumeric random code generator php
- failed to clear cache laravel
- php random string generator
- Str::random() example
- days to date php
- e error reporting all
- datetime::timeformat php
- execution time exentd php