| About the Authors |
|
xiii | |
| About the Contributor |
|
xv | |
| Acknowledgments |
|
xix | |
| Introduction |
|
xxi | |
|
Chapter 1 Getting Started |
|
|
1 | (14) |
|
|
|
1 | (1) |
|
|
|
2 | (1) |
|
Why PHP, Ngnix, and MySQL? |
|
|
3 | (1) |
|
|
|
4 | (6) |
|
|
|
5 | (1) |
|
|
|
6 | (1) |
|
|
|
7 | (3) |
|
Installing Docker-Compose |
|
|
10 | (4) |
|
The Development Environment |
|
|
11 | (3) |
|
|
|
14 | (1) |
|
Chapter 2 PHP Fundamentals |
|
|
15 | (18) |
|
|
|
15 | (3) |
|
|
|
18 | (4) |
|
|
|
22 | (3) |
|
|
|
25 | (5) |
|
|
|
30 | (3) |
|
Chapter 3 Functions, Classes, and Traits |
|
|
33 | (16) |
|
|
|
34 | (4) |
|
Reviewing Class Definitions |
|
|
35 | (2) |
|
|
|
37 | (1) |
|
A Closer Look at Class Inheritance |
|
|
38 | (2) |
|
Polymorphism and Abstract Classes |
|
|
40 | (8) |
|
|
|
42 | (1) |
|
|
|
43 | (1) |
|
|
|
44 | (2) |
|
|
|
46 | (2) |
|
|
|
48 | (1) |
|
Chapter 4 Data and Data Types |
|
|
49 | (26) |
|
|
|
49 | (1) |
|
PHP Data Types: Scalar Types |
|
|
50 | (1) |
|
|
|
51 | (1) |
|
|
|
52 | (1) |
|
|
|
52 | (1) |
|
|
|
53 | (7) |
|
|
|
60 | (8) |
|
|
|
60 | (2) |
|
|
|
62 | (1) |
|
|
|
62 | (1) |
|
|
|
63 | (1) |
|
|
|
64 | (1) |
|
|
|
65 | (1) |
|
|
|
66 | (1) |
|
|
|
66 | (1) |
|
|
|
67 | (1) |
|
PHP Data Types: Compound Types |
|
|
68 | (1) |
|
|
|
68 | (3) |
|
|
|
71 | (1) |
|
PHP Data Types: Special Types |
|
|
71 | (1) |
|
|
|
71 | (1) |
|
|
|
72 | (1) |
|
|
|
72 | (3) |
|
|
|
75 | (10) |
|
|
|
76 | (4) |
|
|
|
80 | (3) |
|
|
|
83 | (2) |
|
|
|
85 | (64) |
|
PHP Indexed and Associative Arrays |
|
|
85 | (6) |
|
PHP Multidimensional Arrays |
|
|
91 | (1) |
|
|
|
91 | (56) |
|
|
|
93 | (1) |
|
|
|
93 | (1) |
|
|
|
94 | (1) |
|
|
|
95 | (1) |
|
|
|
95 | (1) |
|
|
|
96 | (1) |
|
|
|
96 | (1) |
|
|
|
97 | (1) |
|
|
|
97 | (1) |
|
|
|
98 | (1) |
|
|
|
99 | (1) |
|
|
|
99 | (1) |
|
|
|
100 | (1) |
|
|
|
101 | (1) |
|
|
|
101 | (1) |
|
|
|
102 | (1) |
|
|
|
102 | (1) |
|
|
|
103 | (1) |
|
|
|
104 | (1) |
|
|
|
104 | (1) |
|
|
|
105 | (1) |
|
|
|
105 | (1) |
|
|
|
106 | (1) |
|
|
|
106 | (1) |
|
|
|
107 | (1) |
|
|
|
108 | (1) |
|
|
|
108 | (1) |
|
|
|
109 | (1) |
|
|
|
110 | (1) |
|
|
|
110 | (1) |
|
|
|
111 | (1) |
|
|
|
111 | (1) |
|
|
|
112 | (1) |
|
|
|
113 | (1) |
|
|
|
113 | (1) |
|
|
|
114 | (1) |
|
|
|
115 | (1) |
|
|
|
115 | (1) |
|
|
|
116 | (1) |
|
|
|
117 | (1) |
|
|
|
118 | (2) |
|
|
|
120 | (1) |
|
|
|
120 | (1) |
|
|
|
121 | (1) |
|
|
|
122 | (1) |
|
|
|
123 | (1) |
|
|
|
123 | (1) |
|
|
|
124 | (1) |
|
|
|
125 | (1) |
|
|
|
126 | (1) |
|
|
|
126 | (1) |
|
|
|
127 | (1) |
|
|
|
127 | (1) |
|
|
|
128 | (1) |
|
|
|
129 | (1) |
|
|
|
130 | (1) |
|
|
|
131 | (1) |
|
|
|
131 | (1) |
|
|
|
132 | (1) |
|
|
|
133 | (1) |
|
|
|
134 | (1) |
|
|
|
134 | (2) |
|
|
|
136 | (1) |
|
|
|
137 | (1) |
|
|
|
137 | (1) |
|
|
|
137 | (1) |
|
|
|
138 | (1) |
|
|
|
139 | (1) |
|
|
|
139 | (1) |
|
|
|
140 | (1) |
|
|
|
140 | (1) |
|
|
|
141 | (1) |
|
|
|
142 | (1) |
|
|
|
142 | (1) |
|
|
|
143 | (1) |
|
|
|
144 | (1) |
|
|
|
144 | (1) |
|
|
|
144 | (1) |
|
|
|
145 | (1) |
|
|
|
146 | (1) |
|
|
|
146 | (1) |
|
|
|
147 | (2) |
|
Chapter 7 Sessions and Cookies |
|
|
149 | (16) |
|
|
|
149 | (11) |
|
|
|
160 | (3) |
|
|
|
163 | (2) |
|
|
|
165 | (6) |
|
|
|
167 | (2) |
|
|
|
169 | (2) |
|
Chapter 9 PHP Exceptions, Validation, and Regular Expressions |
|
|
171 | (22) |
|
|
|
172 | (5) |
|
|
|
177 | (7) |
|
|
|
184 | (7) |
|
Regular Expressions Modifiers |
|
|
185 | (1) |
|
Regular Expression Metacharacters |
|
|
185 | (1) |
|
Regular Expression Square Brackets |
|
|
186 | (1) |
|
Regular Expression Quantifiers |
|
|
187 | (1) |
|
Regular Expression Functions |
|
|
187 | (4) |
|
|
|
191 | (2) |
|
Chapter 10 PHP and MySQL Working Together |
|
|
193 | (18) |
|
PHP Communication with MySQL |
|
|
194 | (4) |
|
PHP Communication with the MySQLi Method |
|
|
194 | (3) |
|
PHP Communication with the PDO Method |
|
|
197 | (1) |
|
|
|
198 | (1) |
|
|
|
198 | (1) |
|
PHP Connection to a Database |
|
|
199 | (10) |
|
|
|
209 | (2) |
|
|
|
211 | (10) |
|
Planning for a New Database |
|
|
211 | (3) |
|
Creation of a New Database |
|
|
214 | (5) |
|
|
|
219 | (2) |
|
Chapter 12 Website with a DB |
|
|
221 | (10) |
|
|
|
229 | (2) |
|
Chapter 13 Introduction to Frameworks |
|
|
231 | (16) |
|
Introduction to Frameworks |
|
|
231 | (1) |
|
Pros and Cons of Frameworks |
|
|
232 | (3) |
|
|
|
232 | (2) |
|
|
|
234 | (1) |
|
|
|
235 | (1) |
|
Different Layers of a Framework |
|
|
236 | (1) |
|
Different Types of Frameworks |
|
|
237 | (2) |
|
|
|
238 | (1) |
|
Introduction of PHP Standard Recommendation (PSR) |
|
|
239 | (2) |
|
|
|
241 | (4) |
|
|
|
242 | (3) |
|
|
|
245 | (2) |
|
Chapter 14 Introduction to Laravel |
|
|
247 | (26) |
|
|
|
248 | (1) |
|
|
|
248 | (2) |
|
Database Setup and Configuration |
|
|
250 | (14) |
|
|
|
253 | (6) |
|
|
|
259 | (5) |
|
|
|
264 | (7) |
|
Storing User Data in a Database |
|
|
267 | (4) |
|
|
|
271 | (2) |
|
Chapter 15 Introduction to Symfony |
|
|
273 | (12) |
|
|
|
273 | (6) |
|
|
|
279 | (4) |
|
Creating a Symfony Application |
|
|
281 | (2) |
|
|
|
283 | (2) |
|
Chapter 16 A Basic Symfony Application |
|
|
285 | (30) |
|
Creating a New Symfony Project |
|
|
285 | (3) |
|
Database Setup and Configuration |
|
|
288 | (12) |
|
|
|
300 | (5) |
|
|
|
305 | (3) |
|
Storing User Data in a Database |
|
|
308 | (5) |
|
|
|
313 | (2) |
| Index |
|
315 | |