title: How to execute PHP from Java
body: <p>I'm trying to open a console and run a PHP script, but after running it I need to print stuff to the console to get data from my Java program to the script, and the other way around.</p>
  
  <p>I know there are already questions on here that ask kinda the same thing, but they don't mention how to get variables from the program to the script.</p>