Home > Article > Development Tools > How to run php code in sublime
How to run PHP code in Sublime Text: Install the PHP Companion plug-in through Package Control. Create a PHP file and configure PHP settings, specifying the path to the PHP executable file. Press Ctrl B (Windows/Linux) or Cmd B (macOS) to run PHP code in the console.
Running PHP code in Sublime
Sublime Text is a popular text editor that is extensible and customizability features. Plugins allow you to extend Sublime's functionality, including running PHP code.
Method:
Install PHP plug-in:
Create a PHP file:
Configure PHP settings:
Add the following line to the configuration file:
/usr/bin/php
with the actual path to the PHP executable file. Run the PHP code:
Ctrl
B
(Windows/Linux) or Cmd
B
(macOS). Other tips:
Ctrl
Alt
P
(Windows/Linux) or Cmd
Alt
P
(macOS) Open the Command Palette and enter "PHP" to run additional PHP commands. The above is the detailed content of How to run php code in sublime. For more information, please follow other related articles on the PHP Chinese website!