Strange echo, print behaviour in PHP?

前端 未结 4 2059
半阙折子戏
半阙折子戏 2020-12-02 00:57

The following code outputs 43211, why?

  echo print(\'3\').\'2\'.print(\'4\');
4条回答
  •  情深已故
    2020-12-02 01:23

    You are using a function within a function as alex said. Just simply use echo or print.

    echo '3'.'2'.'4'; 
    

    will return properly or likewise for print.

提交回复
热议问题