Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.1.md判断函数返回值是否被使用的方法 #145

Open
wuzhix opened this issue Oct 12, 2016 · 1 comment
Open

6.1.md判断函数返回值是否被使用的方法 #145

wuzhix opened this issue Oct 12, 2016 · 1 comment

Comments

@wuzhix
Copy link

wuzhix commented Oct 12, 2016

在php7中if (return_value_used)方法会报错:
错误:‘return_value_used’未声明(在此函数内第一次使用)
参考了php-7.0.11\ext\standard\array.c的方法if (USED_RET()),编译运行正常。但是php_error_docref(NULL TSRMLS_CC, E_NOTICE,"猫了个咪的,我就知道你没用我的劳动成果!");没输出来

@xxlixin1993
Copy link

xxlixin1993 commented Aug 16, 2017

@wzx19840423
你的error_reporting等级设置的可能是NOTICE不显示,你可以试下php -r 'error_reporting(E_ALL);sample_array_range();'
return_value_used那个确实使用if (USED_RET())后正常了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants