Q:

users next birthday not giving the right value in php

I want to implement Birthday countdown time. Normally, birthday normally takes place once in a year eg within 365 days. I downloaded this code from stackoverflow to check the next birthday day of someone who was born on august 22 1982. the days count down should be less than 365 days but the code below is giving a higher value with negative sign.
$rem = strtotime('1982-22-08') - time();
$day = floor($rem / 86400);
$hr  = floor(($rem % 86400) / 3600);
$min = floor(($rem % 3600) / 60);
$sec = ($rem % 60);
if($day) echo "$day Days ";
if($hr) echo "$hr Hours ";
if($min) echo "$min Minutes ";
if($sec) echo "$sec Seconds ";
echo "Remaining...";

the next birthday countdown should be less than 365 days
Thanks

A:

Its because you have wrong date format in strtotime and return nothing. 
Documentation says

strtotime — Parse about any English textual datetime description into
  a Unix timestamp

So if you use 
strtotime('08/22/18')

it will work.
Also you should take actual year if you want say "hey your birthday in this is will be..."

