Skip to content
a2rpPublic

About

Personal PHP notes, lessons, examples, and Q&A.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

501 Commits

Folders and files

Repository files navigation

PHP: Practical Notes

These are my personal learning notes, shaped by what I study and practice. This repository brings PHP concepts together in a clear, practical guide that I can revisit and share.

The course follows a step-by-step path from PHP fundamentals through web development, databases, security, testing, deployment, and practical projects. It focuses on modern PHP and calls out version-specific behavior where it matters.

Quick Guides

Lessons

Each lesson has a matching Q&A file and a worked example.

No. Lesson QnA Example
001 Introduction to PHP Open QnA Open Example
002 How PHP fits into a web application Open QnA Open Example
003 PHP releases, versions, and compatibility Open QnA Open Example
004 Install PHP and inspect the runtime Open QnA Open Example
005 Run PHP from the command line and built-in server Open QnA Open Example
006 Set up the editor, terminal, and project files Open QnA Open Example
007 PHP tags and embedding PHP in HTML Open QnA Open Example
008 Statements, instruction separation, and comments Open QnA Open Example
009 Identifiers, keywords, reserved words, and naming Open QnA Open Example
010 Variables and assignment Open QnA Open Example
011 Variable scope, global variables, and static locals Open QnA Open Example
012 Superglobals and external input Open QnA Open Example
013 The PHP type system and value model Open QnA Open Example
014 Null, booleans, integers, and floating-point numbers Open QnA Open Example
015 Strings and numeric strings Open QnA Open Example
016 Indexed and associative arrays Open QnA Open Example
017 Objects, resources, callables, and iterables Open QnA Open Example
018 Type juggling, casting, and conversion Open QnA Open Example
019 Type declarations and strict typing Open QnA Open Example
020 Nullable, union, and intersection types Open QnA Open Example
021 Mixed, void, never, and literal types Open QnA Open Example
022 Constants, predefined constants, and magic constants Open QnA Open Example
023 Expressions and value evaluation Open QnA Open Example
024 Operator precedence and associativity Open QnA Open Example
025 Arithmetic, assignment, and increment operators Open QnA Open Example
026 Comparison, identity, and ordering operators Open QnA Open Example
027 Logical operators and short-circuit evaluation Open QnA Open Example
028 String, array, bitwise, and other operators Open QnA Open Example
029 Ternary, null coalescing, and nullsafe operators Open QnA Open Example
030 Conditional branching with if and switch Open QnA Open Example
031 The match expression Open QnA Open Example
032 Loops with while, do-while, and for Open QnA Open Example
033 foreach loops and key-value iteration Open QnA Open Example
034 break, continue, goto, and declare Open QnA Open Example
035 Including and requiring PHP files Open QnA Open Example
036 Returning values and ending execution Open QnA Open Example
037 Defining and calling functions Open QnA Open Example
038 Function parameters and arguments Open QnA Open Example
039 Default, named, variadic, and unpacked arguments Open QnA Open Example
040 Function return types Open QnA Open Example
041 Anonymous functions and closures Open QnA Open Example
042 Arrow functions Open QnA Open Example
043 Callable values and first-class callable syntax Open QnA Open Example
044 Partial function application Open QnA Open Example
045 Passing and returning values by reference Open QnA Open Example
046 Generators and yield Open QnA Open Example
047 Iterators, Traversable, and iterable values Open QnA Open Example
048 Working with strings Open QnA Open Example
049 Working with arrays Open QnA Open Example
050 Regular expressions with PCRE Open QnA Open Example
051 Dates, times, and time zones Open QnA Open Example
052 Text encoding, localization, and internationalization Open QnA Open Example
053 Files, directories, and filesystem operations Open QnA Open Example
054 Streams, wrappers, and contexts Open QnA Open Example
055 Encoding and decoding JSON Open QnA Open Example
056 Serialization and safe data exchange Open QnA Open Example
057 Errors, exceptions, and Throwable Open QnA Open Example
058 try, catch, finally, and throwing exceptions Open QnA Open Example
059 PHP errors, exceptions, and error categories Open QnA Open Example
060 Error reporting, handlers, and assertions Open QnA Open Example
061 Debugging, diagnostics, and application logging Open QnA Open Example
062 Classes, objects, and object-oriented PHP Open QnA Open Example
063 Properties, methods, and object creation Open QnA Open Example
064 Constructors and destructors Open QnA Open Example
065 Visibility and encapsulation Open QnA Open Example
066 Static properties and methods Open QnA Open Example
067 Inheritance and method overriding Open QnA Open Example
068 Composition and object collaboration Open QnA Open Example
069 Abstract classes and final declarations Open QnA Open Example
070 Interfaces and contracts Open QnA Open Example
071 Traits and code reuse Open QnA Open Example
072 Class constants and constant expressions Open QnA Open Example
073 Readonly properties and classes Open QnA Open Example
074 Constructor property promotion Open QnA Open Example
075 Property hooks Open QnA Open Example
076 Magic methods Open QnA Open Example
077 Cloning and comparing objects Open QnA Open Example
078 Late static binding Open QnA Open Example
079 Enumerations and backed enums Open QnA Open Example
080 Namespaces, imports, and name resolution Open QnA Open Example
081 Autoloading classes and files Open QnA Open Example
082 Attributes and metadata Open QnA Open Example
083 Reflection API Open QnA Open Example
084 HTTP requests, responses, and the PHP request lifecycle Open QnA Open Example
085 Generating HTML safely with templates Open QnA Open Example
086 Reading query strings and request data Open QnA Open Example
087 HTML forms and GET or POST requests Open QnA Open Example
088 Input validation and normalization Open QnA Open Example
089 Response headers, status codes, and redirects Open QnA Open Example
090 Cookies and browser state Open QnA Open Example
091 Sessions and server-side state Open QnA Open Example
092 Password hashing and verification Open QnA Open Example
093 Authentication and authorization Open QnA Open Example
094 Handling file uploads Open QnA Open Example
095 Validating uploads and storing files safely Open QnA Open Example
096 Making HTTP requests with streams and cURL Open QnA Open Example
097 Building JSON and REST APIs Open QnA Open Example
098 Relational databases and SQL fundamentals Open QnA Open Example
099 Connecting to databases with PDO Open QnA Open Example
100 Prepared statements and safe database queries Open QnA Open Example
101 Database transactions and error handling Open QnA Open Example
102 Filtering, sorting, and paginating database results Open QnA Open Example
103 Using the MySQLi extension Open QnA Open Example
104 Schema design and database migrations Open QnA Open Example
105 Command-line applications and arguments Open QnA Open Example
106 Environment configuration and secrets Open QnA Open Example
107 Composer and dependency management Open QnA Open Example
108 Composer autoloading and PSR-4 Open QnA Open Example
109 Version constraints, lockfiles, and packages Open QnA Open Example
110 PHP-FIG standards and PSR recommendations Open QnA Open Example
111 Project structure, namespaces, and application layers Open QnA Open Example
112 Routing, controllers, and middleware Open QnA Open Example
113 Dependency injection and service design Open QnA Open Example
114 Application configuration and logging Open QnA Open Example
115 Caching data and application output Open QnA Open Example
116 PHP extensions and the extension ecosystem Open QnA Open Example
117 Testing PHP applications with PHPUnit Open QnA Open Example
118 Unit tests, fixtures, and data providers Open QnA Open Example
119 Integration tests for databases and HTTP Open QnA Open Example
120 Test doubles, stubs, and mocks Open QnA Open Example
121 Static analysis with PHPStan and Psalm Open QnA Open Example
122 Formatting, linting, and code quality tools Open QnA Open Example
123 Secure coding and threat modeling Open QnA Open Example
124 Preventing SQL injection Open QnA Open Example
125 Preventing cross-site scripting Open QnA Open Example
126 Preventing cross-site request forgery Open QnA Open Example
127 Authentication, authorization, and access control Open QnA Open Example
128 Session and cookie security Open QnA Open Example
129 Path traversal and filesystem security Open QnA Open Example
130 SSRF, URL validation, and redirect safety Open QnA Open Example
131 Command injection and unsafe deserialization Open QnA Open Example
132 Managing secrets and production configuration Open QnA Open Example
133 Dependency security and software supply chains Open QnA Open Example
134 HTTPS, security headers, and secure transport Open QnA Open Example
135 Safe error handling and private information Open QnA Open Example
136 Profiling PHP applications Open QnA Open Example
137 OPcache and PHP-FPM Open QnA Open Example
138 Memory use and performance optimization Open QnA Open Example
139 Fibers and cooperative concurrency Open QnA Open Example
140 Background jobs, queues, and workers Open QnA Open Example
141 Deployment environments and release workflows Open QnA Open Example
142 Apache, Nginx, and PHP-FPM integration Open QnA Open Example
143 Production configuration, permissions, and logging Open QnA Open Example
144 Database migration and deployment strategies Open QnA Open Example
145 PHP version compatibility and migration guides Open QnA Open Example
146 PHPDoc, API documentation, and type annotations Open QnA Open Example
147 Code review, maintenance, and upgrades Open QnA Open Example
148 Project: build a personal portfolio page Open QnA Open Example
149 Project: create a validated contact form Open QnA Open Example
150 Project: build a database-backed CRUD application Open QnA Open Example
151 Project: build a JSON API Open QnA Open Example
152 Capstone project: plan, build, test, and document an application Open QnA Open Example
153 PHP quick reference and glossary Open QnA Open Example

About

Personal PHP notes, lessons, examples, and Q&A.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors