Last Updated: July 8, 2019

Execute Snippet As PHP

Macro Monday – a new macro to dig into every Monday!

Often you might be editing a PHP script and you want to quickly execute a snippet
of code to test it on its own, or you might even want to simply use PHP to quickly
perform some logic for you on the fly. It’s with that in mind that I originally
created this macro years ago. You simply write some code, select your code and
execute the macro to run your code and see the results. If you have no code
selected then the current file is used. The best part for me is that the file
does not need to be saved, allowing for quick testing.

This macro could easily be modified to support multiple languages, please feel
free to fork it and submit your modifications.

Installation

To install the macro simply hit the “View Resource” and “Install Instructions”
links below. You’ll want to hook the macro up to the “On Startup” trigger.

Share Your Own Awesome Macros

Do you have your own awesome macro’s that you think others could benefit from?
Submit them to the Resources Section and if you really want to get it noticed
write a Macro Monday blog about it.

Nathan Rijksen

Nathan Rijksen

Nathan Rijksen is the Development Lead for Komodo IDE. He works adeptly with Mozilla, Python and JavaScript to ensure that Komodo IDE is the IDE of choice for development teams. Nathan has been working with Komodo IDE for a decade before joining the development team in 2012. Since then he has worked tirelessly on new features such as Commando, Breadcrumbs, a completely new UI and much more.