- PHP 7 Programming Blueprints
- Jose Palala Martin Helmich
- 100字
- 2021-07-08 11:14:10
Summary
As you can see, we have a lot of use cases for the null coalesce.
We learned how to make a simple user profile system, and how to use PHP 7's null coalesce feature when fetching data from the database, which returns null if there are no records. We also learned that the null coalesce operator is similar to a ternary operator, except this returns null by default if there is no data.
In the next chapter, we'll have more use cases for other PHP 7 features, especially when creating the database abstraction layer for use in our projects.
推薦閱讀
- Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
- Drupal 8 Blueprints
- Java高手真經(高級編程卷):Java Web高級開發技術
- Python GUI Programming Cookbook
- Swift 3 New Features
- Windows Server 2012 Unified Remote Access Planning and Deployment
- CouchDB and PHP Web Development Beginner’s Guide
- Mathematica Data Analysis
- SQL經典實例(第2版)
- SQL Server數據庫管理與開發兵書
- C語言程序設計與應用(第2版)
- Python趣味編程與精彩實例
- Go語言從入門到精通
- Python+Office:輕松實現Python辦公自動化
- 從“1”開始3D編程