Out of several ways to connect SAP to PHP - Web services and RFC (Remote Function Calls) are more used by developers.
SAPRFC is an extension module for PHP 4 and PHP 5. With SAPRFC it is possible to call ABAP function modules in SAP R/3 from PHP scripts. You can use PHP language to create web applications or interface programs with connectivity to the SAP R/3. You can also write RFC server program in PHP and call PHP functions from SAP R/3.