Thank you for posting.
The native FileMaker PHP API is significantly different from the PDO interface. However, it may be possible to use the FileMaker ODBC interface.
According to the PHP documentation, there is a PDO ODBC driver:
If this allows you to use PDO with any generic ODBC data source, then you may be able to use it to query a FileMaker database as well.
How can I enable ODBC support? I have this option in FM Server admin panel but the checkbox is greyed out?
Generally ODBC is enabled during the initial deployment of FileMaker Server Advanced after installation. I should mention that the ODBC feature is specific to FileMaker Server Advanced and won't be available in FileMaker Server.
If you don't have the Advanced version, you could use the trial to test with your app: