Multi-line code in PHP interactive shell
Posted
by Andrei
on Stack Overflow
See other posts from Stack Overflow
or by Andrei
Published on 2010-06-15T23:14:12Z
Indexed on
2010/06/15
23:22 UTC
Read the original article
Hit count: 203
I'm learning to use the PHP interactive shell, but I'm having trouble with multi-line code.
Using backslashes like in the UNIX shells doesn't seem to work. What am I doing wrong ?
php > function test(){\
php { echo "test";\
php { }\
php > test();
PHP Parse error: syntax error, unexpected T_ECHO, expecting T_STRING in php shell code on line 2
© Stack Overflow or respective owner