Function: run-php

run-php is an autoloaded, interactive and byte-compiled function defined in php-ts-mode.el.gz.

Signature

(run-php &optional CMD CONFIG)

Documentation

Run an PHP interpreter as a inferior process.

Arguments CMD and CONFIG, default to php-ts-mode-php-executable and php-ts-mode-php-config respectively, control which PHP interpreter is run. Prompt for CMD if php-ts-mode-php-executable is nil. Optional CONFIG, if supplied, is the php.ini file to use.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/php-ts-mode.el.gz
;;; Inferior PHP process.

;;;###autoload
(defun run-php (&optional cmd config)
  "Run an PHP interpreter as a inferior process.

Arguments CMD and CONFIG, default to `php-ts-mode-php-executable'
and `php-ts-mode-php-config' respectively, control which PHP interpreter is run.
Prompt for CMD if `php-ts-mode-php-executable' is nil.
Optional CONFIG, if supplied, is the php.ini file to use."
  (interactive (when current-prefix-arg
		 (list
		  (read-string "Run PHP: " (php-ts-mode--executable))
		  (expand-file-name
		   (read-file-name "With config: " php-ts-mode-php-config)))))
  (let* ((php-prog (php-ts-mode--executable))
	 (buffer (get-buffer-create php-ts-mode-inferior-php-buffer))
	 (cmd (or
	       cmd
	       php-prog
	       (read-string "Run PHP: " php-prog)))
	 (config (or
		  config
		  (and php-ts-mode-php-config
		       (expand-file-name php-ts-mode-php-config)))))
    (unless (comint-check-proc buffer)
      (with-current-buffer buffer
	(inferior-php-ts-mode-startup cmd config)
	(inferior-php-ts-mode)))
    (when buffer
      (pop-to-buffer buffer))))