$str1 = <<< STRING_END<span (id | style) = ( ' | ")
STRING_END;var_dump ("$str1");虽然小弟使用了字符串定界符,var_dump()还是会用字符实体转义'真见鬼!

解决方案 »

  1.   

    刚测试了下 也转义了
    查看生成的源码是
    <pre class='xdebug-var-dump' dir='ltr'><small>string</small> <font color='#cc0000'>'&#10;&lt;span (id | style) = ( &apos; | &quot;)&#10;'</font> <i>(length=31)</i>
    </pre>使用print_r的时候 就没有转义。不知道我这是不是因为使用了xdebug的原因
      

  2.   

    echo和print_r,都不存在这个问题
      

  3.   

    没发现转义。
    察看源代码为
    ===========================================
    string(29) "<span (id | style) = ( ' | ")"
      

  4.   

    用PHPEDIT2.12.8,确实要转义:string '
    <span (id | style) = ( &apos; | ")' (length=35)
      

  5.   

    我测试了一下,没有转义,结果:
    string(35) " <span (id | style) = ( ' | ') " 
      

  6.   

    string(35) " <span (id | style) = ( ' | ") "
    我的结果!