How to use Firebird with Delphi4PHP?
The main problem with Delphi4PHP is that it has multiple copies of GDS32.DLL library. This is the client library for InterBase 8, which you need to replace with Firebird's FBCLIENT.DLL.
First, make a copy of FBCLIENT.DLL from your Firebird installation and rename it to GDS32.DLL. Then look in subdirectories of your Delphi installation (usually something like C:\Programs files\Codegear\Delphi for PHP\2.0) and either replace those with Firebird's client, or delete them. Deleting should work if you have a copy of Firebird client library in System32 folder of your Windows installation (installing this is one of the options in Firebird installer)
Firebird 2.x and InterBase 8.x separated since InterBase 6.0 and have gone a long way, so a lot of features are no longer compatible.