PHP 的 Interactive shell 模式

臨時要測個簡單的程式片段 或 Function, 一般都會於 CLI 寫來跑一跑, Interactive 模式 可以邊寫邊測試~ (互動模式, 寫完一行就 Compile 一行)

而 PHP CLI 的模式有兩種差異: (執行方法: $ php -a, 說明可見: PHP: Interactive shell)

  • Interactive shell 比較像是 互動式, 有問有答的執行程式.
  • Interactive mode enabled 則是輸入一整個區塊的程式碼, Ctrl-D 執行.

閱讀全文〈PHP 的 Interactive shell 模式〉