|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-04-29 12:07 UTC] IMadeThisUpForBugzilla at yahoo dot com
Description: ------------ Run php at the command line in Windows in interactive mode (php -a), echo something, nothing happens until the process is ended (see test script for example command line session). Doesn't work in PHP 5.3.X. Does work in PHP 5.2.X. Tried Zend build, version shipped with eclipse, and version distributed on windows.php.net VC6 and VC9. Test script: --------------- c:\php> .\php.exe -an Interactive mode enabled <?php echo 'hi'; ^Z hi c:\php> Expected result: ---------------- Session example included. Should output the string 'hi' to the console after "echo 'hi';" (this is correct in PHP 5.2.X) Actual result: -------------- Nothing output after executing "echo 'hi';" line. See test script for example session at command line. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 22:00:01 2025 UTC |
This works as expected; without readline you have the "interactive mode" which works differently from the "interactive shell". In interactive mode you have to type a complete PHP script, and afterwards to press CRTL+d (POSIX) or CTRL+z followed by ENTER (Windows) to evaluate the script. See user note 108006 for further details. The only thing that is suboptimal, is that the message reporting whether the interactive shell or the interactive mode would be enabled, is compiled statically what may lead to erroneous info. You still can distinguish interactive mode/shell, because only for the latter the prompt ("php >") is shown. [1] <https://www.php.net/manual/en/features.commandline.interactive.php#108006>