SunshinePHP Developer Conference 2015


自 PHP 5 起完全重写了对象模型以得到更佳性能和更多特性。这是自 PHP 4 以来的最大变化。PHP 5 具有完整的对象模型。

PHP 5 中的新特性包括访问控制抽象类final 类与方法,附加的魔术方法接口对象复制类型约束

PHP 对待对象的方式与引用和句柄相同,即每个变量都持有对象的引用,而不是整个对象的拷贝。参见对象和引用

add a note add a note

User Contributed Notes 2 notes

Rahul G
9 months ago
Object and  classes in php5 is the most powerful and efficient way to organize your code logically, easier to update and understand. it's based on the real world examples.
richard at racecom dot co dot uk
8 months ago
But sometimes its better to think like an electronic digital device rather than a real world equivalent and program using the best logic for performance as well as simplicity. Objects and Classes are usually best, but not always.
To Top