Which of the following statements can be used to add two months to the existing date? $date = modify(‘+2 months’); $date->modify(‘+2 months’); $date->modify(‘2+ months’); $date = modify(‘2+ months’); TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following code?<br/>If say date is 22/06/2013.<br/>echo "Today is ".date("F d, Y") Today is 06-22-2013 Today is June 22, 2013 Today is 22-06-2013 Today is 22 June, 2013 TRUE ANSWER : ? YOUR ANSWER : ?
Say you want to calculate the date 45 days from the present date which one of the following statement will you use? totime(“+45 days”) strtotime(“+45 days”) strtotime(“-45 days”) totime(“+45”) TRUE ANSWER : ? YOUR ANSWER : ?
The getdate() function returns An integer A floating-point number A Boolean An array A string TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following function is useful for producing a timestamp based on a given date and time. time() mktime() mrtime() mtime() TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following functions do not return a timestamp?<br/>1. time()<br/>2. date()<br/>3. strtotime()<br/>4. localtime()<br/>5. gmmktime() Option 2 and 4 Option 2 and 4 Option 1 and 4 Option 1 and 5 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid'); FALSE TRUE Invalid Valid TRUE ANSWER : ? YOUR ANSWER : ?
To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed? $date = new DateTime(“22 JUNE 2013”) $date = DateTime(“22 JUNE 2013”) $date = Date(“22 JUNE 2013”) $date = new Date(“JUNE 22 2013”) TRUE ANSWER : ? YOUR ANSWER : ?
If the format is F then which one of the following will be returned? Complete text representation of month Day of month, without zeros Day of month, with leading zero Daylight saving time TRUE ANSWER : ? YOUR ANSWER : ?