`There is no way to get the value of whatever you returned there. You weren’t even able to in PHP, if it is started as externel OS-process as you did here.
If you want to have communication between your PHP script and your Elixir programm, then you have to do it via IO of some kind. Networking, Files, Stdin/-out… There is no way around this limitation
A PHP return statement takes the argument you give it and passes it up the PHP stack, however if there are no other PHP functions up the PHP stack then it vanishes as the PHP script ends. To get it you will need to echo it or pass it over a pipe or whatever else as others state.