php string escaping like python's “”“ ”“”?

前端 未结 3 981
Happy的楠姐
Happy的楠姐 2021-01-20 11:32

Hi I was wondering if there is an easy way to escape strings in php.

In python I use \"\"\" \"\"\", and everything between there is escaped. so when using special c

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-20 11:45

    Since PHP 5.3, you can use nowdoc. As opposed to heredoc, nowdoc does not expand variables inside it.

提交回复
热议问题