1. Object-Oriented Foundations
At the heart of modern PHP is its object-oriented programming model. A class is a blueprint that defines the properties (variables) and methods (functions) its objects will have. Y...
Read full chapter →The essential Php Programming cheat sheet: 7 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
At the heart of modern PHP is its object-oriented programming model. A class is a blueprint that defines the properties (variables) and methods (functions) its objects will have. Y...
Read full chapter →PHP supports inheritance through the extends keyword, which lets a child class reuse and extend the behavior of a parent class. The child inherits all public and protected properti...
Read full chapter →As PHP projects grow, name collisions become inevitable: two libraries may both define a class called User or Logger. Namespaces solve this by acting as virtual directories for you...
Read full chapter →Since PHP 7, type declarations have become a cornerstone of robust PHP code. Type hints let you declare the expected types of function parameters and return values, enabling PHP's...
Read full chapter →PHP's array is a versatile ordered map that doubles as a list, and the language provides many built-in functions for transforming and querying them. array_map() applies a callback...
Read full chapter →For database access, PHP Data Objects (PDO) provides a uniform layer across multiple database engines. You connect by instantiating PDO with a Data Source Name that encodes the dri...
Read full chapter →Closures are anonymous functions that you can assign to variables, pass as arguments, or return from other functions. A regular closure captures variables from its enclosing scope...
Read full chapter →Done reading?
Test yourself with the Php Programming practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →