Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find beautiful PHP code to read? [closed]

Tags:

php

As a way to find inspiration and improve my PHP skills, I am looking for some beautiful PHP source code to read, preferably an open source "standard" web site rather than a more tool-like project such as phpMyAdmin.

So, where can I find some beautiful PHP code?

like image 324
Erik Öjebo Avatar asked Sep 27 '08 15:09

Erik Öjebo


People also ask

Can you view PHP code from a website?

PHP is a server-side programming language, meaning it is executed at the web server before the website is sent to the end-user. This is why you can't see the PHP code when you view the source code.

Where do I put PHP code in HTML?

A PHP script can be placed anywhere in the document. The default file extension for PHP files is " .php ". A PHP file normally contains HTML tags, and some PHP scripting code.

What is PHP source code?

PHP is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

How do I start PHP programming?

In order to start PHP, MySQL, PHPMyAdmin and Apache in a single attempt, XAMPP should be installed. Scroll over to XAMPP for Windows and download should begin shortly. Click the .exe file to start the installation procedure. Select the components which you want to install and click “Next”.


3 Answers

CodeIgniter code is beautiful. There are many projects written in CodeIgniter which are publically available and you can check out the source code.

Have a look at the Getting started page of CodeIgniter's tutorial and read through. I can gaurantee you'll be inspired and want to fire up your IDE and get coding straight away :).

You can also download and have a look at the source code of Bamboo invoice. When I need inspiration I also search for 'php code' on youtube :)

like image 125
Ali Avatar answered Oct 29 '22 12:10

Ali


Not all opensource projects are great examples as of how things are done.

Take a look at PEAR, ezComponents and the Zend Framework. All three are pretty popular in the PHP world, they solve a ton of different problems [each sometimes with a different approach] and they all follow great coding standards.

Also, there is often a trade-off between beautiful/elegant code and code that is very optimized. For example, if you want to see code that is powered to run a large website which needs to handle a lot of traffic, check out Mediawiki. It's build on very efficient code, but it's not very pretty.

like image 8
Till Avatar answered Oct 29 '22 11:10

Till


Try looking at the source of the best PHP frameworks - Zend's, Symfony and CakePHP. They are very well documented and generally well designed.

like image 7
Eran Galperin Avatar answered Oct 29 '22 10:10

Eran Galperin