Some php wamp/lamp packages come with php extensions packaged within like php_amf, php_db, php_gd2 and I just have to activate the extension, or install the extension if it doesn't come by default.
My question in general is, how are these extensions different from libraries? and in specific I want to know, can an extension be turned into a library that's loaded in the project itself? the goal is to call the library without special installations like php extensions need. Sometimes when you're on shared hosting, you don't have enough privileges to install a new extension.