为了账号安全,请及时绑定邮箱和手机立即绑定

求大神解答

http://img1.sycdn.imooc.com//5a3b835c00011cec07200236.jpg

请问这个注意怎么理解?

我自己测试了一波,代码如下:

<?php

header('content-type:text/html;charset=utf-8');

if(!function_exists('get_extension')){

function get_extension() 

{

$i = 'b';

echo 'a';

echo '<hr/>';

echo $i.'c';

echo '<hr/>';

return $i;

}

$file='get_extension';

echo $file();

?>

不是说不能用于echo吗?为什么我的还是能正常使用输出正常?

http://img1.sycdn.imooc.com//5a3b84000001c44904220110.jpg

这是为什么呢?我感觉我没理解清楚,求大牛解答

正在回答

3 回答

<?php

header('content-type:text/html;charset=utf-8');

if(!function_exists('get_extension')){

function get_extension() 

{

$i = 'b';

echo 'a';

echo '<hr/>';

echo $i.'c';

echo '<hr/>';

return $i;

}

$file='get_extension';

$abc = 'echo';

echo $file();

echo '<hr/>';

$abc get_extensionfile();

?>

像这种就会报错,就是说echo这种结构性的不能用作变量来使用的意思,我自己这么理解的

1 回复 有任何疑惑可以回复我~

哦,懂了懂了

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

求大神解答

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信