Answer: Results can be output in Sublime Text through the command palette, console, plug-ins, external scripts, and Node.js plug-ins. Detailed description: Command panel: Enter the "View: Show Console" command and use console.log() to print to the console. Console: Use print_r() or var_dump() to output variables to a file. Plug-ins: Install the Console 2 plug-in for color output and formatting. SublimeREPL: Create an interactive REPL environment. Other methods: Automate browser operations, call external scripts, run Node.js scripts.
How to use Sublime Text to output results
Direct output
View: Show Console
in the command panel (Ctrl/Cmd Shift P), and enter console.log() in the console
. print_r()
or var_dump()
to output variables to the specified file, for example print_r($ variable, true) > output.txt
. Using Plugins
Other methods
The above is the detailed content of How to output results in sublime. For more information, please follow other related articles on the PHP Chinese website!