3 ms·
PHP isn't as bad as it used to be. Yes fundamental operator order is erratic and I'm forever googling basic functions, but the ecosystem has produced some good
by joemaller1 11y ago
PHP isn't as bad as it used to be. Yes fundamental operator order is erratic and I'm forever googling basic functions, but the ecosystem has produced some good stuff over the past couple years.
Read up on Composer and Packagist. It's basically NPM, Gems, or PyPi for PHP. There are now solid interoperable libraries for most common tasks.
- https://getcomposer.org https://getcomposer.org
- https://packagist.org https://packagist.org
Laravel is a great framework, but quite a bit of what's out there seems to be built on the Symfony foundation.
- http://laravel.com http://laravel.com
- http://symfony.com http://symfony.com
There are also great coding guidelines and tools that are evolving. The PHP Framework Interoperability Group has produced some solid coding standards and tooling has followed.
- http://www.php-fig.org http://www.php-fig.org
WordPress...it makes me sad. But it's ubiquitous. If you're stuck doing WP work, take a look at the Roots project. It's a sane, modern approach with good tooling.
- https://roots.io https://roots.io
- gtirloni 11y agoI've been called a few times to troubleshoot slow PHP websites only to discover they were using Symfony and could not sustain 5req/sec on fairly beefy hardware. All kinds of PHP optimizations couldn't make it run much faster (which complicated the infrastructure a lot later on). The last time was 1 year ago so unless something impressive happened since then, I would suggest against it.
- giaour 11y agoSomething impressive must have happened, as the symphony projects I've worked on recently have been able to support far more load than what you're describing on ec2 micro instances.
- Gigablah 11y agoThat tends to happen if you use all the bells and whistles that come with the standard framework boilerplate, like annotations and the Doctrine ORM. Sometimes Silex is all you need.
- ohashi 11y agoDid you actually diagnose what was causing it to be slow? Something like NewRelic might help break down where the actual slowdown is versus saying it was the framework.
- grover_hartmann 11y agoThanks for those links but they mentioned their codebase is full of legacy code. I talked about what they use on their PHP stacks and they mentioned they don't use any frameworks at all. They use AngularJS for their front-end but on the PHP side they use pure PHP and no frameworks at all.