Multi-line code in PHP interactive shell
- by Andrei
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