In PHP, what is the differences between NULL and setting a string to equal 2 single quotes

后端 未结 5 1326
情歌与酒
情歌与酒 2020-11-30 05:06

I used to set things like this when I wanted blank values.

$blankVar = \'\';

Then after some months, I decided this looked better and had a

5条回答
  •  失恋的感觉
    2020-11-30 05:18

    Well, it's one thing how nice each approach looks, but the main difference is that one is an empty string and the other is an uninitialized variable (null)

提交回复
热议问题