Skip to content

Commit

Permalink
Add php-runtime-extension-loaded-p
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Apr 2, 2023
1 parent 3393804 commit 5e5d252
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php-runtime.el
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,10 @@ Pass INPUT-BUFFER to PHP executable as STDIN."
(when php-runtime--kill-temp-output-buffer
(kill-buffer (php-runtime-stdout-buffer executor))))))

;;;###autoload
(defun php-runtime-extension-loaded-p (extension)
"Return T if EXTENSION is loaded."
(string= "1" (php-runtime-expr (format "extension_loaded(%s)" (php-runtime-quote-string extension)))))

(provide 'php-runtime)
;;; php-runtime.el ends here

0 comments on commit 5e5d252

Please sign in to comment.