TAILIEUCHUNG - Zend PHP Certification Study Guide- P7

Zend PHP Certification Study Guide- P7: 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ề. | 104 Chapter 5 Strings and Regular Expressions 5. Which of the following output True A. if true print True B. string true if string 0 print True C. string true if strncasecmp string Trudeau 4 print True D. if strpos truelove true print True E. if strstr truelove true print True Answers A B C and E are correct. Answer A is correct because a non-empty string will evaluate to true inside an if block. Answer B is covered in the chapter when comparing a string and an integer with PHP will convert the string into an integer. true converts to 0 as it has no numeric parts. In answer C strncasecmp returns 1 because the first four characters of Trud come before the first four characters of true when sorted not case sensitively. Answer D is incorrect because strpos returns 0 here true matches truelove at offset 0 . We could make this return True by requiring strpos to be false. Answer E is correct because strstr will return the entire string which will evaluate to true in the if block. 6 File Manipulation Techniques You ll Need to Master How to open a file How to read from a file How to write to a file How to close a file How to interact with the filesystem How to lock files Miscellaneous functions for handling files Terms You ll Need to Understand File resources File properties Advisory locking End of File Interacting with files is a constant aspect of programming. Whether they are cache files data files or configuration files the ability to manipulate files and their contents is a core skill for PHP programmers. In this chapter you will learn how to open file stream resources for reading from and writing to files as well as filesystem-level functions for manipulating file attributes. 106 Chapter 6 File Manipulation Opening Files When interacting with files in PHP the first step is to open them. Opening files creates a resource that you must pass to the functions for reading writing and locking files. To open a file use the fopen function. fopen takes as its first parameter .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.