Shared Modules vs Compiling php –with-[extention]

PHP extensions  are either compiled into PHP or simply loaded as Shared modules.
Compiled into PHP example

./configure --with-mysql

or

Shared Module example

php_mysql.dll
http://php.net/manual/en/install.windows.extensions.php
php_mysql.so

or you can use yum or apt-get depending on your platform to install the shared modules.