Why does this code output this ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why does this code output this ?

why does the function: function longtime ($timestamp) { return longdate ("l F jS Y", $timestamp); } echo date(time()); //output: 1528819983 instead of the this "correct" one which is : function longdate ($timestamp) { return date ("l F jS Y", $timestamp); } echo longdate(time()); //output: Tuesday June 12th, 2018

12th Jun 2018, 4:28 PM
Minerals2016
Minerals2016 - avatar
1 Answer
+ 1
i believe date returns a certain amount of time units passed since some year. a quick google search should help you with the details
12th Jun 2018, 4:50 PM
hinanawi
hinanawi - avatar