I still love you PHP
PHP 8
201–210 of 273 posts
Re: PHP 8
#202I wonder what makes the Symfony Demo App not being faster with the JIT compiler (as shown on https://www.php.net/releases/8.0/en.php and https://susi.dev/php8-benchmark-jit-symfony ). Maybe because Symfony already caches things very efficiently/cleverly with OPCache?
Mostly because only cpu-intensive code greatly benefits from JIT. Serving a blog (like the demo) is not much cpu-intensive.
Re: PHP 8
#203> 0 == 'foobar' // true That's PHP7 behaviour that's updated in 8 to return false. I'm not a PHP basher, I really like it these days, but why the heck was that example ever evaluating to true?
I suspect they copied that behavior from Perl.
Re: PHP 8
#204How should one start learning with PHP these days? My experience: hacked together a few PHP scripts over the years to notify me of a website change (5 minute cron job). Before that, I was a very good beginner with VB6 back in highschool. There are a couple of ambitious database-driven website projects I would like to create, but I don't know where to start. I like the KISS philosophy, and I think PHP and MySQL would…
Modern PHPs shining light is the Laravel framework and the ecosystem built up around it. If you're going to start a database-driven website projects in PHP there really isn't a good reason to not use and learn Laravel (or Lumen if you want something more lightweight). That being said if you're not tied to PHP I'm not sure I'd necessarily recommend it. The obvious alternatives worth looking into are Ruby on Rails or P…
12 year professional PHP developer (in that it's been my main language, I've also written a lot of C# and TypeScript in that period) - I'd pick Symfony for any project I knew was going to last more than a few years before the inevitable re-write.
The problem is you don't see the difference until you've seen multiple large codebases implemented in both frameworks.
Symfony is harder to bootstrap a project with (though not really that true since 5) but in nearly every other way it gets more right than wrong.
Re: PHP 8
#205Re: PHP 8
#206Apparently some of the deprecations will make this the most backward compatibility breaking version jump of PHP since V4 to V5. (Read a german interview here: https://www.heise.de/news/PHP-8-im-Experten-Check-Der-erwart... ) There's a long report on Wordpress and PHP 8 and it's not pretty: https://developer.yoast.com/blog/the-2020-wordpress-and-php-...
Report generation times:
PHP 7.4 = 67ms avg
PHP 8.0 = 66ms avg
This is getting the data from MySQL and massaging it for the templates. With Laravel's insane amount of indirection, of course.
Re: PHP 8
#207Apparently some of the deprecations will make this the most backward compatibility breaking version jump of PHP since V4 to V5. (Read a german interview here: https://www.heise.de/news/PHP-8-im-Experten-Check-Der-erwart... ) There's a long report on Wordpress and PHP 8 and it's not pretty: https://developer.yoast.com/blog/the-2020-wordpress-and-php-...
WordPress core team members and users are welcome to get involved in PHP development and providing feedback on proposals. They are notably absent, and so people who write modern PHP - or wish PHP was a different language - are the ones influencing language development.
Re: PHP 8
#208Earlier quoted context omitted.
I suspect they copied that behavior from Perl.
Perl avoids this problem by having contexts, a bit like casts but with easier syntax, and by having separate numeric and string equality operators.
Re: PHP 8
#209React php is worth checking out. Async stuff like websockets and non blocking redis subscriptions.
Re: PHP 8
#210Facebook’s backups were written in PHP. Well, the second version was, anyway. (The first version didn’t work so well.) By backups, I mean the central MySQL databases with profile and post information; not media or messages. The “Crown Jewels,” so to speak. It was written by an engineer in a week or so and then handed off to me. I was a storage guy with some programming chops. Fewer chops than I thought. Multiprocess,…
Did you use those backups often?