Home >Backend Development >PHP Tutorial >PHP输出,为什么两者不一样

PHP输出,为什么两者不一样

WBOY
WBOYOriginal
2016-06-06 20:35:271192browse

<code>    $url = 'http://192.168.67.166:10001/Home-Ptime-index-id-2?abc=1&bcd=2';
    echo iconv("UTF-8", "gbk", urldecode($url));
    var_dump(iconv("UTF-8", "gbk", urldecode($url)));
</code>

回复内容:

<code>    $url = 'http://192.168.67.166:10001/Home-Ptime-index-id-2?abc=1&bcd=2';
    echo iconv("UTF-8", "gbk", urldecode($url));
    var_dump(iconv("UTF-8", "gbk", urldecode($url)));
</code>

http://3v4l.org/KjgRk 是哪里有不一样了?!

PHP输出,为什么两者不一样

我在ThinkPHP中打出来是这个

echo 输出字符串内容。
var_dump 这个可以算更全的输出方式,一般用于调试查看。输出的内容是 数据类型+数据

你的一个是echo 一个是var_dump()啊

看看这里

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn