Zend PHP Certification Study Guide- P2
Thông tin tài liệu:
Nội dung trích xuất từ tài liệu:
Zend PHP Certification Study Guide- P2 1 The Basics of PHPP HP IS THE MOST POPULAR WEB-DEVELOPMENT language in the world. According toestimates compiled in April 2004, there are over fifteen million unique domains—andalmost two million unique IPs—on the World Wide Web that reside on servers wherePHP is supported and used. The term “PHP” is actually a “recursive acronym” that stands for PHP: HypertextPreprocessor. It might look a bit odd, but it is quite clever, if you think of it. PHP is a“scripting language”—a language intended for interpretation and execution rather thancompilation such as, for example, C. The fact that PHP is interpreted and not compiled, however, does not mean that it isincapable of meeting the demands of today’s highly intensive web environments—in fact,a properly written PHP script can deliver incredibly high performance and power.Terms You’ll Need to Understand n Language and Platform n Language construct n Data type n Opening and closing tags n Expression n Variable n Operation and operator precedence n Conditional structures n Iteration and Loops n Functions n Variable variables and variable functions6 Chapter 1 The Basics of PHP Techniques You’ll Need to Master n Creating a script n Entering PHP mode n Handling data types n Type casting and type juggling n Creating statements n Creating operations and expressions n Writing functions n Handling conditional statements n Handling loops Language and Platform The two biggest strengths of PHP are its simplicity and the incredible set of functionality that it provides. As a language, it incorporates C’s elegant syntax without the hassle of memory and pointer management, as well as Perl’s powerful constructs—without the complexity often associated with Perl scripts. As a platform, PHP provides a powerful set of functions that cover a multitude of dif- ferent needs and capabilities. Programmers who work on commercial platforms such as Microsoft ASP often marvel at the arsenal of functionality that a PHP developer has at his fingertips without the need to purchase or install anything other than the basic inter- preter package.What’s more, PHP is also extensible through a set of well-defined C APIs that make it easy for anyone to add more functionality to it as needed. You have probably noticed that we have made a distinction between “language” and “platform.” By the former, we mean PHP proper—the body of syntactical rules and constructs that make it possible to create a set of commands that can be executed in a particular sequence.The latter, on the other hand, is a term that we use to identify those facilities that make it possible for the language to perform actions such as communicat- ing with the outside, sending an email, or connecting to a database. The certification exam verifies your knowledge on both the language and the plat- form—after all, a good programmer needs to know how to write code and how to use all the tools at his disposal. Therefore, it is important that you acquaint yourself with both aspects of PHP development in order to successfully pass the exam. Getting Started The basic element of a PHP application is the script. A PHP script contains a number of commands that the PHP interpreter reads, parses, and executes. Getting Started 7 Because PHP is designed to manipulate text files—such as HTML documents—andoutput them, the process of mixing hard-coded textual content and PHP code is facili-tated by the fact that unless you tell it otherwise, the PHP interpreter considers the con-tents of the script file as plain text and outputs them as they are. It’s only when you explicitly indicate that you are embedding PHP code inside a filethat the interpreter goes to work and starts parsing and executing commands.This isdone by using a special set of opening and closing tags. In part because of historical reasonsand in order to promote maximum flexibility, PHP supports three different sets of tags: n PHP opening () tags n HTML-style tags ( and ) n “Short” tags: n “ASP-style” tags: The full PHP tags are always available to a script, whereas short tags and ASP-style tagsmight or might not be available to your script, depending on how the particular installa-tion of the PHP interpreter used to execute it is configured.This is made necessary bythe fact that short tags can interfere with XML documents, whereas ASP-style tags caninterfere with other languages that can ...
Tìm kiếm theo từ khóa liên quan:
phương pháp lập trình lập trình web với php ngôn ngữ lập trình php lập trình cơ bản XMLGợi ý tài liệu liên quan:
-
Giáo trình Lập trình logic trong prolog: Phần 1
114 trang 194 0 0 -
Giáo trình Lập trình C căn bản
135 trang 170 0 0 -
Giáo trình Lập trình C căn bản: Phần 1
64 trang 170 0 0 -
66 trang 154 0 0
-
14 trang 134 0 0
-
Bài giảng Phương pháp lập trình: Chương 9 - GV. Từ Thị Xuân Hiền
36 trang 112 0 0 -
Giáo trình lập trình hướng đối tượng - Lê Thị Mỹ Hạnh ĐH Đà Nẵng
165 trang 112 0 0 -
47 trang 111 2 0
-
Giáo trình về môn Lập trình C căn bản
131 trang 50 0 0 -
Bài giảng Lập trình hướng đối tượng (dùng JAVA): Chương 1 - Trần Minh Thái
40 trang 41 0 0 -
Bài giảng Lập trình web nâng cao: Chương 1 - Trường ĐH Văn Hiến
16 trang 38 1 0 -
PHP: The Good Parts: Delivering the Best of PHP- P5
20 trang 36 0 0 -
24 trang 34 0 0
-
Giáo trình Lập trình hướng đối tượng C++
197 trang 28 0 0 -
Bài giảng Lập trình căn bản - Trường CĐ Công nghệ và Nông Lâm Nam Bộ
219 trang 28 0 0 -
68 trang 27 0 0
-
Tóm tắt Đồ án tốt nghiệp Công nghệ thông tin: Xây dựng website bán đồng hồ
20 trang 26 0 0 -
Bài giảng Phương pháp lập trình - Chương 4: Mảng
9 trang 26 0 0 -
Bài giảng Phương pháp lập trình: Bài 8 - TS. Ngô Hữu Dũng
43 trang 25 0 0 -
50 trang 25 0 0