⚙️
PHP Tools Hub
Tools
PHP
Quick
Contact
Home
>
Tutorials
>
PHP
>
PHP OOP
PHP OOP Tutorials
139 tutorials found.
📘
$this property
$this Usage | Access Properties | PHP
📘
Access from Anywhere
Visibility | public Keyword | PHP
📘
Automatically Called
Constructor | __construct Method | PHP
📘
Automatically Called
Destructor | __destruct Method | PHP
📘
Call on Class Not Object
Static Methods | static Keyword | PHP
📘
Cannot Instantiate
Abstract Classes | abstract Keyword | PHP
📘
Child Extends Parent
Inheritance | extends Keyword | PHP
📘
Code Reuse Mechanism
Traits | trait Keyword | PHP
📘
Compare Property Values
Object Comparison | Equal Operator | PHP
📘
Convert Object to String
Object Serialization | serialize Function | PHP
📘
Create Object Copy
Object Cloning | clone Keyword | PHP
📘
Create Object Instance
Objects | new Keyword | PHP
📘
Create One Off Object
Anonymous Classes | new class | PHP
📘
Current Object Reference
$this Keyword | $this Variable | PHP
📘
Define Class Blueprint
Classes | class Keyword | PHP
📘
Define Contract
Interfaces | interface Keyword | PHP
📘
Define Namespace
Namespaces | namespace Keyword | PHP
📘
Generate Values On Demand
Generators | yield Keyword | PHP
📘
Hash Attribute PHP 8
Attributes | Attribute Syntax | PHP
📘
Implement Custom Iteration
Iterators | Iterator Interface | PHP
📘
Inspect Class Information
Reflection | ReflectionClass | PHP
📘
Object Constructor
Magic Methods | __construct | PHP
📘
PHP 8.1 Enumerations
Enums | enum Keyword | PHP
📘
public protected private
Properties | Property Declaration | PHP
📘
public protected private
Methods | Method Declaration | PHP
📘
Return Private Property
Getters and Setters | Getter Method | PHP
📘
Runtime Class Name
Late Static Binding | static Resolution | PHP
📘
Shared Across Instances
Static Properties | static Property | PHP
📘
$object = new Class
Objects | Object Variable | PHP
📘
$this method
$this Usage | Call Methods | PHP
📘
Access Inside Class and Child
Visibility | protected Keyword | PHP
📘
Base Class Definition
Inheritance | Parent Class | PHP
📘
Can Have Constructor
Anonymous Classes | Constructor | PHP
📘
Class Implements Interface
Interfaces | implements Keyword | PHP
📘
ClassName dollar property
Static Properties | Access Syntax | PHP
📘
ClassName method
Static Methods | Method Call | PHP
📘
Close Database Connections
Destructor | Use Cases | PHP
📘
colon type Declaration
Methods | Method Return Type | PHP
📘
Compare Object Identity
Object Comparison | Identical Operator | PHP
📘
Create Custom Attribute
Attributes | Attribute Class | PHP
📘
Default Clone Behavior
Object Cloning | Shallow Copy | PHP
📘
Delegate Generation
Generators | yield from | PHP
📘
Get Late Static Class
Late Static Binding | get_called_class | PHP
📘
Import Namespace Class
Namespaces | use Keyword | PHP
📘
Import Trait into Class
Traits | use Keyword | PHP
📘
Inspect Method Information
Reflection | ReflectionMethod | PHP
📘
No Implementation Only Declaration
Abstract Classes | Abstract Method | PHP
📘
Object Destructor
Magic Methods | __destruct | PHP
📘
PascalCase Convention
Classes | Class Naming | PHP
📘
Pass Initial Values
Constructor | Constructor Parameters | PHP
📘
Restore Object from String
Object Serialization | unserialize Function | PHP
📘
Return External Iterator
Iterators | IteratorAggregate | PHP
📘
Set Private Property
Getters and Setters | Setter Method | PHP
📘
Simple Case Values
Enums | Basic Enum | PHP
📘
Type Declaration PHP 7.4
Properties | Property Types | PHP
📘
Access Only Inside Class
Visibility | private Keyword | PHP
📘
Access Undefined Property
Magic Methods | __get | PHP
📘
Can Extend Other Classes
Anonymous Classes | Extend Class | PHP
📘
Class Method Property Constant
Attributes | Attribute Target | PHP
📘
Default Values
Properties | Property Initialization | PHP
📘
Deprecated in PHP 8
Object Serialization | Serializable Interface | PHP
📘
Derived Class Definition
Inheritance | Child Class | PHP
📘
Early Binding
Static Methods | self Keyword | PHP
📘
Free Resources
Destructor | Use Cases | PHP
📘
Full Implementation Allowed
Abstract Classes | Concrete Method | PHP
📘
Implement Multiple Interfaces
Interfaces | Multiple Interfaces | PHP
📘
Inspect Property Information
Reflection | ReflectionProperty | PHP
📘
Iterate Over Arrays
Iterators | ArrayIterator | PHP
📘
Manual Clone Nested Objects
Object Cloning | Deep Copy | PHP
📘
Multiple Instances Possible
Objects | Multiple Objects | PHP
📘
Namespace Alias
Namespaces | as Keyword | PHP
📘
Pass Values to Methods
Methods | Method Parameters | PHP
📘
PHP 8 Declare Properties
Constructor | Constructor Promotion | PHP
📘
self dollar property
Static Properties | self Access | PHP
📘
Send Throw GetReturn
Generators | Generator Object | PHP
📘
String or Int Backed Values
Enums | Backed Enum | PHP
📘
Use Multiple Traits
Traits | Multiple Traits | PHP
📘
User Class Definition
Classes | Example Class | PHP
📘
Validate Before Set
Getters and Setters | Validation in Setter | PHP
📘
Attribute TARGET ALL
Attributes | Attribute Flags | PHP
📘
Backslash Global Namespace
Namespaces | Fully Qualified Name | PHP
📘
Can Implement Interfaces
Anonymous Classes | Implement Interface | PHP
📘
Child Must Implement Abstract Methods
Abstract Classes | Child Implementation | PHP
📘
Child Redefines Parent Method
Inheritance | Method Override | PHP
📘
Customize Clone Behavior
Object Cloning | __clone Method | PHP
📘
Enums Can Have Methods
Enums | Enum Methods | PHP
📘
Generate Large Datasets
Generators | Memory Efficiency | PHP
📘
Inspect Parameter Information
Reflection | ReflectionParameter | PHP
📘
insteadof Operator
Traits | Conflict Resolution | PHP
📘
Interface Extends Interface
Interfaces | Interface Inheritance | PHP
📘
Late Binding
Static Methods | static Keyword | PHP
📘
object method name
Methods | Method Call | PHP
📘
Only Getter No Setter
Getters and Setters | Readonly Property | PHP
📘
parent construct Call
Constructor | Parent Constructor | PHP
📘
Private by Default
Visibility | Property Best Practices | PHP
📘
Question Mark Type
Properties | Nullable Properties | PHP
📘
Set Undefined Property
Magic Methods | __set | PHP
📘
static dollar property
Static Properties | static Access | PHP
📘
Treat Array as Object
Iterators | ArrayObject | PHP
📘
Access Parent Method
Inheritance | parent Keyword | PHP
📘
Allow Multiple Same Attribute
Attributes | Repeatable Attribute | PHP
📘
Arrow Operator
Properties | Property Access | PHP
📘
as Operator Change Visibility
Traits | Alias Method | PHP
📘
Call Parent Static
Static Methods | parent Keyword | PHP
📘
Check Undefined Property
Magic Methods | __isset | PHP
📘
Constants in Interface
Interfaces | Interface Constants | PHP
📘
Enums Have Static Methods
Enums | Enum Static Methods | PHP
📘
Nested Namespace Structure
Namespaces | Subnamespaces | PHP
📘
PHP 8 Attribute Reflection
Reflection | ReflectionAttribute | PHP
📘
return this for Fluent
Methods | Method Chaining | PHP
📘
Simple Mock Objects
Anonymous Classes | Use Cases | PHP
📘
Dependency Injection Containers
Reflection | Use Cases | PHP
📘
Enums Have Constants
Enums | Enum Constants | PHP
📘
object property value
Properties | Property Assignment | PHP
📘
Prevent Method Override
Inheritance | final Keyword | PHP
📘
Reflection API Access
Attributes | Read Attributes | PHP
📘
Same File Multiple Namespaces
Namespaces | Multiple Namespaces | PHP
📘
Trait Can Use Trait
Traits | Trait Composition | PHP
📘
Unset Undefined Property
Magic Methods | __unset | PHP
📘
When to Use Which
Interfaces | Abstract vs Interface | PHP
📘
Call Undefined Method
Magic Methods | __call | PHP
📘
Namespace with Braces
Namespaces | Bracketed Syntax | PHP
📘
Prevent Class Extension
Inheritance | final Class | PHP
📘
Traits Can Declare Properties
Traits | Properties in Traits | PHP
📘
Use Enum in Switch Cases
Enums | Enum in Switch | PHP
📘
Autoloading Standard
Namespaces | PSR-4 | PHP
📘
Call Undefined Static Method
Magic Methods | __callStatic | PHP
📘
Not Allowed in PHP
Inheritance | Multiple Inheritance | PHP
📘
Traits Can Require Methods
Traits | Abstract Methods | PHP
📘
When to Use Enums
Enums | Enum vs Class | PHP
📘
String Representation
Magic Methods | __toString | PHP
📘
Object as Function
Magic Methods | __invoke | PHP
📘
Called on Clone
Magic Methods | __clone | PHP
📘
Serialize Properties
Magic Methods | __sleep | PHP
📘
Unserialize Reinitialize
Magic Methods | __wakeup | PHP
📘
Custom Serialization PHP 7.4
Magic Methods | __serialize | PHP
📘
Custom Unserialize PHP 7.4
Magic Methods | __unserialize | PHP
📘
Var Dump Custom Output
Magic Methods | __debugInfo | PHP
📘
Var Export Handler
Magic Methods | __set_state | PHP