Extracted interpreter factory, handles environment check & creates php interpreter