문제

$DEBUG_MODE && (echo "ss");

Error Message Return:

Parse error: syntax error, unexpected T_ECHO in D:\HOSTS\web_portal\test.php on line 99

Can we do the about without using ?: or if? for echo or print_r etc.

도움이 되었습니까?

해결책

it is invalid syntax. You could use print - http://bg2.php.net/print

$DEBUG_MODE && (print('test'));

http://bg2.php.net/echo

echo is not actually a function (it is a language construct), so you are not required to use parentheses with it

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top