问题 I am new to PHP, and I just wanted to run PHP in a command prompt (interactive mode). So I typed this code: `php -v` `<?php` `echo 7;` `?>` But I do not know how to execute it, because when I press Enter cmd expects me to continue writing the code. I searched on php.net and some other forums, but I didn't find anything. So is there a function key or something to display the result? 回答1: Ctrl + d will trigger an end-of-file condition and cause the script to be executed. See also How does the