var_dump('<a>')
// or
var_dump("<a>")
// or
var_dump("\x3Ca>")开发者_StackOverflow社区
// all result in
string(3) ""
What is going on? Only putting a space after the less-than sign works for me.
PHP Version 5.2.10-2ubuntu6.4
The <a>
is probably getting rendered as an empty tag in the browser - try viewing the page source
I believe var_dump takes an expression, not a string. So:
<?php
$a = "<a>";
var_dump($a);
?>
Should work.
精彩评论