国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

The difference between return '' and return in PHP
為情所困
為情所困 2017-05-31 10:34:30
0
2
880

I tried it, and the results returned by var_dump were all NUll. Baidu also found no clear answer.
I saw that return '' seems to be used more often in the code written by others. Could you please tell me about return '' and return in PHP. What's the difference?

為情所困
為情所困

reply all(2)
世界只因有你
  • return '' returns an empty string

  • return returns null
    You can see it through the var_dump result.

For PHP's weakly typed language, there is actually no difference if you don't use it carefully.
But using ===, the comparison will show false

迷茫

I think generally don’t return null, return an empty string or empty array, so that the data acquisition party can process it uniformly (less judgment (~—~))

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template