4 ms·
Any good summaries of what's been happening or background on the renaissance, I used to do some PHP. Mainly Python now, but PHP even in its old incarnation I ha
by actuallymaybe 4y ago
Any good summaries of what's been happening or background on the renaissance, I used to do some PHP. Mainly Python now, but PHP even in its old incarnation I had a sort of love for its idiosyncrasies
Also likewise to the team, kudos to the people who built Castopod
- deepstack 4y agoBeing use PHP when it was Personal Home Page, also dropped out since PHP5 to node and now deno. Wonder what changed in 7 that makes it worth at look again now days.
- jacobyoder 4y ago7 brought a huge speed boost. (typically 100% or more without any code change required). Not specific to 7, but 2 things I think have helped a lot are: * PSR standards * composer packaging Initial PSR work helped define some package interop standards. I'm not sure how useful ongoing PSR work today is (no doubt there's some incremental benefits?). Composer is a great package manager, and helped usher in a lot more sharing/reusability of common components. Laravel bundles a number of Symfony components, for example (many frameworks do). The speed alone in 7 was big, and we've seen some more incremental improvments in 8 and 8.1 and 8.2. It's hard to find current benchmarking tools that compare the 5 series with 7 and 8. I found one showing 5->7 on a mandelbrot run. * PHP 5.0 was 251s * PHP 5.1 was 87s * PHP 5.6 was 29s * PHP 7.0 was 15s * PHP 7.1 was 9s The 'experimental JIT' work (at that time) yielded 4s. That benchmark was from 2016, so... way out of date now, but other numbers I've seen were 7.1->7.4 was another ... 10% improvement on average, and depending on workload, you might see another 10-20% improvement from 7.4->8.0. Kinsta has some interesting useful benchmarks on 'real world' apps https://kinsta.com/blog/php-benchmarks https://kinsta.com/blog/php-benchmarks Been using PHP since 1996, and ecosystem, community, performance all continuously improve year over year.
- obituary_latte 4y agoWow, that's pretty impressive especially with no code changes! Thanks for the breakdown and for sharing!
- jacobyoder 4y agoYou're welcome. Much of the speed bump in 7 came from reworking internal memory usage and allocation. A pointer for an array entry used to be 128 bytes - each array entry had a 128 byte overhead. It was reworked and refactored down to... 42? or 44? You can probably imagine the impact that might have on memory allocation.
- fevangelou 4y agoOTOH, I'd say language changes/improvements, PSR, the tooling of course (Composer/Packagist, tons of CLI tools), the frameworks (Laravel or Symfony, with CakePHP & CodeIgniter still rocking, also micro-frameworks like Slim/Lumen), the libraries (Symfony components, FriendsOfPHP, thephpleague.com), debugging (PHPStan, Phan, Psalm, PHP Insights), refactoring (PHP CS Fixer, PHP_CodeSniffer, Rector), async/event driven (Open Swoole, ReactPHP). On Linux, production multi-PHP deployment is dead-simple thanks to the excellent DEB.SURY.ORG (for DEB based distros) and REMI (for RPM based distros) repos. It's also more common to deploy PHP via PHP-FPM and Nginx nowadays. Homebrew does a decent job on macOS too, multi-PHP deployment is also easy when coupled with Nginx/PHP-FPM. For Windows I have no idea but as long as you got XAMPP and MAMP, well :) Lots of Docker based solutions too like LocalWP (not just for WP), Lando, Laragon, DDEV to name a few. There's also excellent support in editors/IDEs, either by default (in JetBrain's PHPStorm, Nova, KDevelop or Kate Editor) or via plugins for VSCode, Sublime Text, Atom and others.