5 ms·
Ask HN: Examples of good PHP code (entire projects) where can I find them?
It'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?
- leftnode 12y agoMay start here: https://github.com/search?l=PHP&o=desc&q=php&s=stars&type=Repositories&utf8=%E2%9C%93 https://github.com/search?l=PHP&o=desc&q=php&s=stars&type=Re... and see what you find. Particularly, the newer PHP frameworks, Guzzle, Composer, and PHPUnit are good to look at.
- ainiriand 12y agoYou can look at the source of the symfony httpfoundation bundle, it is the best php code in my opinion.
- fiedzia 12y ago/dev/null
- dubin 12y agoHave heard great things about CodeIgniter's source: https://github.com/bcit-ci/CodeIgniter https://github.com/bcit-ci/CodeIgniter
- mahadazad 12y agoCheckout Zend Framework 2 source code.
- aegabriel 12y agoLaravel 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
- hashtag 12y agoI 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 12y agoWhy? 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 12y agoYou'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.
- nikkob 12y agoTry checking these out: http://thephpleague.com/ http://thephpleague.com/ They are very high-quality libraries.
- cafard 12y agoWithin 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.
- ninjaplease 12y agoNo such thing. Use a real language.
- chrisjlee84 12y agoThere 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
- adidash 12y agowordpress.org
- omilu 12y agofound this on reddit: http://www.reddit.com/r/PHP/comments/a9mio/lets_compile_a_list_of_really_good_oo_php_5_code/ http://www.reddit.com/r/PHP/comments/a9mio/lets_compile_a_li...