官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 宝鸡市| 凤山市| 叙永县| 凉城县| 定州市| 普兰县| 衡南县| 孙吴县| 博客| 历史| 吉水县| 富川| 淮南市| 巩留县| 兖州市| 司法| 镇远县| 双城市| 常德市| 南郑县| 龙海市| 昭觉县| 柳林县| 界首市| 衡南县| 龙口市| 长葛市| 定陶县| 浦东新区| 平原县| 苍溪县| 息烽县| 马关县| 疏附县| 六盘水市| 绵阳市| 治县。| 连云港市| 鄂伦春自治旗| 永丰县| 穆棱市|