Pregunta

$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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top