Define different code parts for Local and Remote?

Hello! In PhpStorm, is it possible to have different code executed depending from whether the PHP script is executed LOCALLY or REMOTELY, without having to use if-else?

I could imagine something like this:


When deployed, everything from above would be automatically deleted from the remote copy except of DoThat();

Is there something similar in PhpStorm?

Message was edited by: Peter Panino

1 comment
Comment actions Permalink

Hi there,

It is not possible.

And I, personally, see no reason why this should be an IDE job at all. Plus, you will become IDE-dependant (which means -- somebody else using other tools will not be able to work with your project straight away). You better have 2 separate files (one for local and one for remote) and include/execute only one of them as required.


Please sign in to leave a comment.