subject

$current_date = new DateTime();

$due_days_diff = $current_date->diff($due_date);< br />
if ($current_date > $due_date) {

$overdue_message = $due_days_diff->format(

'%y years, %m months, and %d days overdue.');

}

Questions:

1-. (Refer to code example 1) If $due_date contains a DateTime object, $due_date_diff will contain

a.

a TimeStamp object

b.

a DateTime object

c.

a DateInterval object

d.

a TimeInterval object

2. (Refer to code example ) If $due_date contains a DateTime object for a date that comes 1 month and 7 days before the date stored in the $current_date variable, what will $overdue_message contain when this code finishes executing:

a.

0 years, 1 months, and 7 days overdue.

b.

-0 years, -1 months, and -7 days overdue.

c.

1 month and 7 days overdue.

d.

$overdue_message won’t be set because the if clause won’t be executed

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
What is the process in which the software development team compiles information to determine the final product.
Answers: 3
question
Computers and Technology, 22.06.2019 09:00
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
question
Computers and Technology, 22.06.2019 13:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. centurion: a commander in the army of ancient rome. keyword: picture:
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
You know the right answer?
$current_date = new DateTime();

$due_days_diff = $current_date->diff($due_date);< br...
Questions
question
Physics, 15.12.2020 21:00
question
Mathematics, 15.12.2020 21:00
question
Mathematics, 15.12.2020 21:00