is there a simple php shell for windows?

前端 未结 9 1842
迷失自我
迷失自我 2021-02-04 11:25

Is there a command line php shell available for windows? I looking for something similar to the python shell, that will allow me to open and immediately begin executing code.

9条回答
  •  你的背包
    2021-02-04 12:21

    Another simple variant, influenced by other answers. Create and run the following cmd-script:

    @echo off
    :loop
    php.exe -r "while (true) { eval (fgets (STDIN) ); echo PHP_EOL; }"
    goto loop
    

    Immediate execution, Ctrl+C for exit. Insert correct path before "php.exe".

提交回复
热议问题