Run PHP Script in Vim

Vim IconWhen developing PHP apps I often want to run the current file and see the results. Sometimes I even want to save those results, or perhaps manipulate the results. So I wrote this little vim function to run my currently open PHP file and place the results in a new VIm buffer.

I also have some additional settings configured run add auto completion for PHP functions, check PHP syntax, and run the PHP script.

3 thoughts on “Run PHP Script in Vim

  1. Nick Lo says:

    Is there much advantage that your method offers over just running the current buffer via the command line php command?:

    :!php %

    • Nasir says:

      Is there any advantage in using your method………?

      I am a newbie and want to a run a PHP script .. without checking the outputs in a browser i want to see its output in vim , to speed up my learning process


Leave a Reply

Your email address will not be published. Required fields are marked *