Greetings fellow programmers!
Is there a way to get PHPs interactive shell, php -a
, to behave more like Rails console or the console in Chrome? I have looked through the flags for the php-command, but no dice.
What I get:
php > $a = 0;
php > $a;
php > echo $a;
0php >
What I want
php > $a = 0;
0
php > $a;
0
php > echo $a;
0
php >
You have at least three possibilities to solve this problem:
PHP_EOL
to all yourecho
:echo $a . PHP_EOL
;