哪里可以找到漂亮的PHP代碼來閱讀?

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


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.

作為一種尋找靈感並提高我的PHP技能的方法,我正在尋找一些漂亮的PHP源代碼來閱讀,最好是一個開源的“標准”網站,而不是像phpMyAdmin這樣的工具類項目。

So, where can I find some beautiful PHP code?

那么,我在哪里可以找到一些漂亮的PHP代碼?

10 个解决方案

#1


8  

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

CodeIgniter代碼很漂亮。 CodeIgniter中有許多項目是公開可用的,您可以查看源代碼。

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 :).

查看CodeIgniter教程的入門頁面並閱讀。我可以保證你會受到啟發,想要啟動你的IDE並立即編寫代碼:)。

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 :)

您也可以下載並查看Bamboo發票的源代碼。當我需要靈感時,我也會在youtube上搜索“php code”:)

#2


8  

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.

看看PEAR,ezComponents和Zend Framework。這三者在PHP世界中非常流行,它們解決了大量不同的問題[每種問題有時采用不同的方法]並且它們都遵循很好的編碼標准。

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.

此外,美麗/優雅的代碼和非常優化的代碼之間經常需要權衡。例如,如果您想查看支持運行需要處理大量流量的大型網站的代碼,請查看Mediawiki。它建立在非常高效的代碼之上,但它不是很漂亮。

#3


7  

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

嘗試查看最佳PHP框架的來源 - Zend,Symfony和CakePHP。它們有很好的文檔記錄,通常設計得很好。

#4


5  

Kohana and Zend Framework i'd say. Zend's coding standards is also a good read.

Kohana和Zend Framework我會說。 Zend的編碼標准也很好。

#5


5  

PHPUnit consists of great PHP5.3 code http://github.com/sebastianbergmann/phpunit/tree/

PHPUnit包含很棒的PHP5.3代碼http://github.com/sebastianbergmann/phpunit/tree/

Also the Lithium Framework uses great PHP 5.3 code http://rad-dev.org/lithium/source

此外,Lithium Framework使用了很棒的PHP 5.3代碼http://rad-dev.org/lithium/source

#6


4  

http://fatfree.sourceforge.net/ so minimal it's insane

http://fatfree.sourceforge.net/所以最小化它的瘋狂

http://fuelphp.com/ very easy to use

http://fuelphp.com/非常好用

https://github.com/auraphp Aura has some really interesting standalone packages on offer

https://github.com/auraphp Aura提供了一些非常有趣的獨立包

#7


1  

ezComponents: Well documented, and has very handy tutorials.

ezComponents:文檔齊全,並且有非常方便的教程。

#8


1  

Krugle.org is a great place to browse for code. Not just PHP, of course.

Krugle.org是瀏覽代碼的好地方。當然不只是PHP。

#9


0  

PHP.net is an open source website, but isn't exactly beautiful - some of it feels archaic but it works and is very secure.

PHP.net是一個開源網站,但並不完美 - 有些感覺很古老,但它很有效,而且非常安全。

Symfony is worth looking at, and there are some projects in the PHP.net CVS that are a bit more modern than the website.

Symfony值得一看,PHP.net CVS中的一些項目比網站更現代。

#10


0  

Have a look at "Expert PHP 5 tools" book. There is e-book available in web also.

看看“Expert PHP 5 tools”一書。網上也有電子書。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2008/09/27/725a68e6f40628aa3f46df6bad04c157.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com