I think it makes more sense if you make a plugin that can write php language like 'php tools' on visual studio. Something called 'phptools' is actually very nice but it is not open source code and watch paid video introduction is really nice plugin but the only bad thing is paying not open source