Home>Article>Backend Development> Introduce some features of PHP7
Related learning recommendations:php programming(video)
1.Usage of use
2. The serial number function unserialize has a new filtering function
// 转换对象为 __PHP_Incomplete_Class 对象 $data = unserialize($foo, ["allowed_classes" => false]); // 转换对象为 __PHP_Incomplete_Class 对象,除了 MyClass 和 MyClass2 $data = unserialize($foo, ["allowed_classes" => ["MyClass", "MyClass2"]); // 默认接受所有类 $data = unserialize($foo, ["allowed_classes" => true]);
3. Define a constant array through define
4. Ternary operator null merge
If you want to learn more about programming, please pay attention to thephp trainingcolumn!
The above is the detailed content of Introduce some features of PHP7. For more information, please follow other related articles on the PHP Chinese website!