As far as we know, there is no "simple" way how to "convert" PHP script to PDF format. You can just save the code as PDF document for reviewing or printing purposes. Such php to pdf conversion or export This can be done using the virtual PDF printer in any text editor.
PHP scripts can also generate PDF files dynamically, but this is not conversion of these file formats between each other. You must be a programmer to code that functionality.Open PHP file Open PDF file