zlacker

[return to "PHP 8.2"]
1. user39+j7[view] [source] 2022-12-08 13:16:18
>>TimWol+(OP)
The worst part about PHP is constantly hearing from its detractors, who are often people who haven’t used the language in many years. Haystack needle order, $, fractal of bad design, it just gets old.

The language isn’t perfect but I love working with it, these 8.1 and 8.2 improvements have really made it sweet.

My biggest gripe at the moment is the (very old) behavior of e.g. preg_match() and sort(). You’ve got a small handful of these common functions that operate on their input by reference/in place which is gross. A new version of these would be welcome.

◧◩
2. cies+O9[view] [source] 2022-12-08 13:35:17
>>user39+j7
> I love working with it

Great! Keep using it! Ignore us. We (detractors) also had to use it and have since learned (hopefully several) other languages that (not looking at you JS) we like much better... :)

◧◩◪
3. sbarre+xa[view] [source] 2022-12-08 13:39:14
>>cies+O9
Curious about something.

If you've long moved on and are no longer using PHP, why do you still consider yourself a "detractor"?

◧◩◪◨
4. IgorPa+sc[view] [source] 2022-12-08 13:49:11
>>sbarre+xa
For me PHP 4 and 5 was an experience that left me feeling gross. I had to go home and work on personal projects trying to figure out a way to write beautiful code to offset the ugliness I encountered every day at work.

I still occasionally work with PHP for WordPress and it is still mostly not great. The mess of abstractions, the JS-like library installation system, the lack of any kind of concurrency, the mess with errors vs exceptions.

It just isn’t a language that makes me happy. Then again, I dread opening a .php file so maybe it’s a preconceived notion.

◧◩◪◨⬒
5. mgkims+Jd[view] [source] 2022-12-08 14:03:24
>>IgorPa+sc
It's the 'wordpress' part of PHP that is 'mostly not great'. Projects started in the past few years with any major framework will generally be cleaner and easier to understand, and easier to extend with composer/psr interop.
◧◩◪◨⬒⬓
6. motogp+Uh[view] [source] 2022-12-08 14:29:29
>>mgkims+Jd
I think you're putting too much faith in frameworks there. My employer's large PHP application is written in a framework that was once popular but then was abandoned years ago. Since that framework defines every aspect of the application, down to the directory layout, migrating away from it towards a more recent framework is largely impossible at this point. While it's true that the framework is "easy to understand", it's also true that it encases the application like a concrete coffin.

Libraries are infinitely preferable to frameworks if you want your application's life cycle to be independent of $POPULAR_FRAMEWORK's.

Even with Laravel, which is the current thing in the PHP world, I've worked in multiple teams where their application is written in a very old version of Laravel and there's no desire to attempt an upgrade to the most recent version.

[go to top]