Might I recommend the use of https://github.com/ryakad/pandoc-php/ if you want to be able to access pandoc from within php instead of on the commandline ?