

Ask HN: Examples of good PHP code (entire projects) where can I find them? - omilu

It&#x27;s easy to find great examples of C (Redis, Git), but not easy to find good PHP.  Anyone know where to look to find good PHP code worthy of study?
======
omilu
found this on reddit:

[http://www.reddit.com/r/PHP/comments/a9mio/lets_compile_a_li...](http://www.reddit.com/r/PHP/comments/a9mio/lets_compile_a_list_of_really_good_oo_php_5_code/)

------
chrisjlee84
There are several Frameworks that feature the most well written code out
there.

Symfony is one of them and has some of the best PHP code out there:

[https://github.com/symfony/symfony/](https://github.com/symfony/symfony/)

As well as Aura: [https://github.com/auraphp](https://github.com/auraphp)

And Laravel:
[https://github.com/laravel/laravel](https://github.com/laravel/laravel)

------
leftnode
May start here:
[https://github.com/search?l=PHP&o=desc&q=php&s=stars&type=Re...](https://github.com/search?l=PHP&o=desc&q=php&s=stars&type=Repositories&utf8=%E2%9C%93)
and see what you find.

Particularly, the newer PHP frameworks, Guzzle, Composer, and PHPUnit are good
to look at.

------
hashtag
I find it a bit funny that all the recommendations here are of php frameworks
and none that are projects built in php outside of that

~~~
krapp
Why? Any 'good' web project in any other language also involves a framework,
does it not? Ruby has Rails, Python has Django, etc.

It should be no surprise that structured and organized PHP is better than raw
PHP, and that examples of well written PHP would probably involve a framework.

Although I suppose it could be argued that since PHP is intended for the web,
it shouldn't need a framework, and it should support more of the features a
framework provides out of the box than it does. Nevertheless, the pattern of a
framework is as useful in PHP for the same reasons as it is elsewhere, so I
don't believe it says anything negative about the language per se.

~~~
hashtag
You're missing my point. I'm not the Op but had I been the one asking the
question, I would love to see actual projects that have clean php code written
(even if they were using a framework), rather than refer to how a framework
itself is written.

------
ainiriand
You can look at the source of the symfony httpfoundation bundle, it is the
best php code in my opinion.

------
aegabriel
Laravel is very well written and has some really cool stuff going on,
particularily the IOC container.
[https://github.com/laravel/laravel](https://github.com/laravel/laravel)

------
dubin
Have heard great things about CodeIgniter's source: [https://github.com/bcit-
ci/CodeIgniter](https://github.com/bcit-ci/CodeIgniter)

------
cafard
Within the last year, I think, somebody posted a link on HN to early Facebook
code. I hardly glanced at it, but I remember that it looked well-structured
and perhaps well-commented.

------
nikkob
Try checking these out:

[http://thephpleague.com/](http://thephpleague.com/)

They are very high-quality libraries.

------
mahadazad
Checkout Zend Framework 2 source code.

------
adidash
wordpress.org

------
fiedzia
/dev/null

------
ninjaplease
No such thing. Use a real language.

