TAILIEUCHUNG - Zend PHP Certification Study Guide- P8

Zend PHP Certification Study Guide- P8: Hãy thẳng thừng, Giả sử bạn đang thuê một ai đó để giám sát hệ thống và PHP của bạn có nó thu hẹp xuống để hai ứng cử viên. Một trong những ứng cử viên nói, "Oh yeah, tôi biết tất cả về PHP." Các ứng cử viên khác nói, "Oh yeah, tôi biết tất cả về PHP, tôi đã được thông qua kỳ thi chứng chỉ Zend." câu hỏi tiếp theo của bạn có thể sẽ là "Zend Chứng nhận là gì?" Và các ứng viên nói, "Một công ty chuyên về. | 124 Chapter 7 Managing Dates and Times Also certain time formats can befuddle strtotime . For example this code will cause ts to be set to -1 indicating an error ts strtotime Fri 9 Jan 2004 03 26 23 0000 GMT strtotime has become confused because two separate time zone offsets 0000 and GMT were both specified. If you are manually constructing all the inputs to strtotime for example to take advantage of the next week last week functionality this is not an issue as you can test your inputs to make sure that they are all correctly handled. However if you are using strtotime to handle arbitrarily formatted date entries for example submitted free form through a web page you should take into account the possibility of both incomprehensible and improperly interpreted dates. One of the best aspects of strtotime is using it to handle leap years and daylight saving time. If you need to find the time stamp for the current time tomorrow you cannot simply look 24 hours in the future as it might be 23 or 25 hours if you cross a daylight saving time boundary. strtotime takes this into account though so to find a this time tomorrow you could just say tomorrow strtotime tomorrow Because you did not specify a time strtotime uses the current value. Exam Prep Questions 1. Which of the following sentences are incorrect A. date returns the current UNIX datestamp. B. date returns a formatted date string. C. date requires a time stamp to be passed to it. D. date returns a date array. The correct answers are A C and D. date takes a format string and an optional time stamp and produces a formatted date string. If a UNIX time stamp is not passed into date it will use the current time. 2. The function will return the current UNIX time stamp. The correct answer is time . 3. Which of the following functions will output the current time as 11 26 pm A. print date H m a B. print date G M a C. print date G i a D. print strftime I M p The correct answers are C and D. Exam Prep Questions 125 4. The .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.