Object
PHP includes a complete object model. Some of its features are: visibility, abstract and final classes and methods, additional magic methods, interfaces, and cloning.
object is also a PHP type, which represent an object of any class.
<?php
foreach([11,12,13] as $id => $value) {
print "$id => $value\n";
}
for ($i = 1; $i <= 10; $i++) {
echo $i;
}
$i = 10;
while ($i <= 10) {
echo $i++;
}
$i = 10;
do {
echo $i++;
} while ($i <= 10);
$a = new A;
var_dump($a instanceof object);
?>
See Also
Related
- Visibility
- Abstract Keyword
- Final Keyword
- Magic Methods
- Interface
- Clone
- Type System
- Dereferencing
- PHP Natives
- Pseudo-type
- Special Types
- Handle
- Identity
- instance
- instanceof
- is_a()
- SplObjectStorage
- SplStorageObjects
- State
- Function Subscripting
- Lazy Objects
- Object Invasion
- Object Lifecycle
- Object Syntax