Re: PHP console (php.exe -a)

From: Date: Sun, 27 Dec 2009 17:12:11 +0000
Subject: Re: PHP console (php.exe -a)
References: 1 2 3 4 5 6  Groups: php.windows 
Request: Send a blank email to php-windows+get-29780@lists.php.net to get a copy of this message
Am 27.12.2009 17:30, schrieb Rasmus Lerdorf: >> Is there anybody with Linux to try run "php -a" and tell us how to >> send typed code to execution? > > You just type it in and hit Enter. There is no trick. And without > libreadline there really is no point. Maybe you have another PHP-CLI then me on *nix (5.2.11)? Without libreadline it's working a similar way on *nix, of course I have to type the starting "<?php" myself: | # php -a | Interactive mode enabled | | <?php | $a=5; | $a++; | echo $a.PHP_EOL; | 6 At this point I can enter more code. Or exit PHP with: | ^C | | # But on Windows that's buggy: | # php -a | Interactive mode enabled | | <?php | $a=5; | $a++; | echo $a.PHP_EOL; | Nothing happens on Windows at this point. The cursor is in the next line waiting for input. But, if I now enter "^C", I can see the result: | 6 | | # So on Windows the whole code/input is executed at once and not step by step. And because PHP is also terminated with "^C", I can't enter additional code. Regards, Carsten

« previous php.windows (#29780) next »