We've recently completed adding full support for PDO to the Runtime Converter library. The library supports all native classes using its Java <-> PHP bridge, but certain features like FETCH_OBJECT and bindParam do not work by default because PHP cannot read Java classe...
The Runtime Converter produces code (right now in Java) that is automatically converted from PHP. It has a dependency on a library of helper functions and on the PHP runtime library itself, which is used to provide the library of standard functions.
The reason that people complain about PHP as a language is that it was not developed from scratch as a "programming language" per-se, but rather evolved from a small webpage project ("Personal Home Page") into a programming language.
In general, there is not much about PHP that can't be converted to Java, though it is not particularly easy to do. What needs to be done is to convert the code and include a support library to match the features that aren't available in the target language.