In any scripting or programming language, and not just PHP, we have readymade code blocks or modules that declare the syntax for performing certain actions. If we integrate a PHP extension file with your server code then it adds to the scope of features of your web service, and thereby scales its service offerings to users.