Coding in PHP: Save time by using shared code

PHP is a beautiful programming language for the web. It powers most of the world’s dynamic websites. Facebook uses it. WordPress uses it. With a trillion lines of code out there, it’s likely that someone has already written the code you need to create the feature you want.

There are several places to find this code and download it so you can install it in your project. In order of simplicity:

  1. PHP Snippets – Many websites are repositories for short pieces of code. They usually create simple features and don’t require extra libraries or classes. Just copy and paste and modify a parameter or two.
  2. PEAR – PHP Extension and Application Repository is only simple when you have command line access to your PHP server and know how to use the command line, or you have access to your server’s Control Panel (like cPanel) which has a GUI function to automatically install PEAR components. PEAR components have a common code format and folder structure and should all be installed in the same folder.
  3. PHP Classes – Classes are just like PEAR components, but without the easy installation method or commonalities. However, you’re more likely to find a PHP class that does what you want than a PEAR library that does what you want.
Advertisements

0 Responses to “Coding in PHP: Save time by using shared code”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: