News for hackers. Stuff that matters.
Re:PhpBB 3.3.10 by nigamanth on Sunday February 05, 2023 @08:02PM (#34671860)
This goes on to prove that PHP is still relevant today. No matter how many new frameworks come up, we all know PHP anyways.
Re:PhpBB 3.3.10 by elashri on Sunday February 05, 2023 @08:09PM (#34671919)
I think this applies mainly because of WordPress, not PhpBB and any other project.
Re:PhpBB 3.3.10 by hunter2_ on Sunday February 05, 2023 @08:18PM (#34671993)
Drupal is up there, maybe not as a household name like WordPress, but in some big organizations.
Re:PhpBB 3.3.10 by chippiewill on Sunday February 05, 2023 @08:34PM (#34672102)
Drupal's been on the heavy decline over the past 10 years. Drupal 8/9/10 might turn it around now that Drupal 7 is set to officially retire eventually but it's not had the staying power in the way Wordpress has.

Drupal doesn't really seem to have an ecosystem left anymore.

Re:PhpBB 3.3.10 by thejosh on Sunday February 05, 2023 @08:48PM (#34672218)
It had some decent developers and ecosystem around it a few years ago, but honestly a lot of bureaucracy and drama killed a lot of the enthusiasm in the project and contributed modules for many.
Re:PhpBB 3.3.10 by chx on Sunday February 05, 2023 @09:18PM (#34672437)
...
Re:PhpBB 3.3.10 by geerlingguy on Sunday February 05, 2023 @10:56PM (#34673154)
Always good to see you here chx! I hope you are doing well these days.
Re:PhpBB 3.3.10 by muglug on Sunday February 05, 2023 @09:44PM (#34672641)
Sites like Wix and Squarespace really undermined Drupal and other similar OSS offerings.

There are still things you can only do with a custom sytem, but for most use-cases commercial site-design tools can get you up and running with much less upfront cost.

I designed & built about 20 websites from 2007 to 2014 or so, all with custom designs and backed by an off-the-shelf CMS. Except for the few I maintain for close friends & family, everyone has moved to Squarespace.

While I'm incredibly happy with that arrangement — nobody's pestering me about code I wrote a lifetime ago — it means a whole bunch of sites look much more generic.

For example I wrote some custom JS to dynamically tile pictures on this site: http://web.archive.org/web/20130722050828/https://www.firstc.... Now it displays photos in a generic fashion: https://www.firstchairpromo.com

Re:PhpBB 3.3.10 by 1123581321 on Sunday February 05, 2023 @10:40PM (#34673029)
I think Drupal had largely retreated to being a tool for larger sites before Squarespace’s ascent. That end of the market has increasingly been eaten up by moderately author- and marketer-friendly commercial enterpriseware from providers like Adobe and Progress. It’s a shame, because they are expensive and inhibiting tools, but security and integration demands and the relative prestige of buying blue chip, expensive software have been faster growing primary considerations.
Re:PhpBB 3.3.10 by pancrufty on Monday February 06, 2023 @12:41AM (#34673806)
As someone with similar history as yours but with WordPress, while I appreciate a well-designed website, I think custom websites are a gigantic waste of human resources. Very few need a custom Magento, WooCommerce, or even just a generic WordPress.org install. Every website is much safer with a PaaS, and I believe prices for these will eventually come down.

Just think that before WordPress people were coding a whole website from scratch for the local photographer or news agency, with often sub-optimal and/or overpriced results.

> a whole bunch of sites look much more generic.

True, but that's just a consequence of letting the customer deal with it directly rather than a professional. Most PaaS still allow custom designs, nobody is stopping you from adding a Flash intro page.

Re:PhpBB 3.3.10 by geerlingguy on Sunday February 05, 2023 @10:55PM (#34673149)
Drupal went really high end, and targeted the enterprise use case a lot more. It competes with Sitecore and Sharepoint more than Wordpress these days.

It's terrible for a simple blog or small community or nonprofit site these days. I know because I still run my blog on it, only due to inertia at this point (golden hammer).

Re:PhpBB 3.3.10 by gnulinux on Sunday February 05, 2023 @08:46PM (#34672197)
I think MediaWiki is another seminal PHP project.
Re:PhpBB 3.3.10 by aflag on Monday February 06, 2023 @04:54AM (#34675404)
From what I hear facebook is also mostly hack, which is a similar language to php. I believe it is even backwards compatible with php (or at least it used to be).
Re:PhpBB 3.3.10 by lockhouse on Sunday February 05, 2023 @09:25PM (#34672499)
PHP is still one of the fastest ways to not only program a quick and dirty web app, but more importantly deploy a web app.
Re:PhpBB 3.3.10 by javchz on Sunday February 05, 2023 @10:23PM (#34672920)
I think people who hate PHP, forgot how painful it was to develop server side apps before PHP.

I think one of the greatest legacy of PHP was brining "Serverless" hosting to the masses, where you only focus on the "upload" of the code, and you didn't need an ISS or Linux expert to deploy your projects.

Yeah, PHP had a weird teenage phase, but even JS and Python still have a lot of weird things too (specially JS). But modern frameworks as Laravel, make PHP a great alternative for DJango/FastAPI, Rails or Nest.js.

Re:PhpBB 3.3.10 by nigamanth on Monday February 06, 2023 @01:03AM (#34673927)
Rails is gone, aside from a few use cases there is always a better alternative.
Re:PhpBB 3.3.10 by nik736 on Monday February 06, 2023 @02:29AM (#34674408)
What are those use-cases and what are the alternatives?
Re:PhpBB 3.3.10 by ankit70 on Monday February 06, 2023 @04:44AM (#34675348)
My fav is Action Mailer in rails. AFAIK no other framework has something similar included.
Re:PhpBB 3.3.10 by ceejayoz on Monday February 06, 2023 @06:43AM (#34676085)
https://laravel.com/docs/9.x/mail would be the Laravel equivalent.
Re:PhpBB 3.3.10 by nigamanth on Monday February 06, 2023 @05:36AM (#34675656)
eCommerce.
Re:PhpBB 3.3.10 by Sharparam on Monday February 06, 2023 @09:00AM (#34677345)
Someone should notify all the websites using Rails that their framework apparently no longer exists.
Re:PhpBB 3.3.10 by nsonha on Sunday February 05, 2023 @10:03PM (#34672774)
every figgin web dev topic, popularity does not evidence merits. It's just a shitty language that existed at the right time when web technologies were booming.

When more options become available, people stop choosing PHP.

And please don't reply with js, like "but PHP is better than shit", that's a real high bar.

Re:PhpBB 3.3.10 by rabuse on Sunday February 05, 2023 @10:10PM (#34672820)
What exactly makes PHP 8 shit?
Re:PhpBB 3.3.10 by nsonha on Sunday February 05, 2023 @10:19PM (#34672883)
no one has discussed it a million times on HN, so I don't exactly know
Re:PhpBB 3.3.10 by archerx on Monday February 06, 2023 @01:23AM (#34674028)
Ah, I see you’re just saying jt sucks just because the cargo cult says it sucks. Thanks for clarifying.
Re:PhpBB 3.3.10 by nsonha on Monday February 06, 2023 @05:38PM (#34685513)
The cargo cult says it sucks AND I say it sucks. There is no “because”. Maybe if you’re better at logic you would be able to code languages other than PHP.
Re:PhpBB 3.3.10 by rabuse on Monday February 06, 2023 @07:31PM (#34686742)
This reply is hilariously elitist.
Re:PhpBB 3.3.10 by PetahNZ on Monday February 06, 2023 @02:34AM (#34674435)
No typed variables, no generics, threading/async is hard(er than other languages).

[This is coming from a long time PHP dev who actually loves it.]

Re:PhpBB 3.3.10 by PetahNZ on Monday February 06, 2023 @02:42AM (#34674482)
But what makes it good? It's fast, it uses low memory, it has a great package manager, it has great backwards compatibility, it has a huge ecosystem of libraries, it is easily integrated with other technology, it scales, it has an easier learning curve, it's easy to hire for (although it has been getting harder).
Re:PhpBB 3.3.10 by unity1001 on Monday February 06, 2023 @07:38AM (#34676461)
> (although it has been getting harder)

Its likely getting harder because PHP has developed its own specializations in the form of frameworks. Laravel is one, WordPress has become another. People look for 'Laravel developer', not 'PHP developer'. Or, 'Wocoomerce developer' -> not 'WordPress plugin developer', not 'WordPress developer', the least, not 'PHP developer'.

Specializing in one of such emerging specialization fields pays !much more! than just developing on PHP, so it will become more difficult to find PHP developers into the future. Especially the WordPress enterprise ecosystem sucks a lot of WordPress/PHP developers out of the contracting market into high-paid, long-term jobs.

Re:PhpBB 3.3.10 by llanowarelves on Sunday February 05, 2023 @11:52PM (#34673493)
PHP was / (is?) hacky but there's no denying the very good culture of "getting stuff done" (and monetizing it) around it.
Re:PhpBB 3.3.10 by spiderfarmer on Monday February 06, 2023 @04:55AM (#34675412)
Was hacky. It's awesome now.
Re:PhpBB 3.3.10 by unity1001 on Monday February 06, 2023 @07:35AM (#34676436)
Precisely because PHP was always used and is still used in the front-line trenches of the web where business needs are always the #1 concern. Its used by small to medium businesses, professionals, individuals to run their businesses, communities and so on. There isn't any room for overoptimization, there isnt any room for wasting the non-existent VC money in developing questionable features, there isnt any room for any complicated setup that could cost time, which actually means money.

For that reason its also the most successful front of Open Source where an actual thriving ecosystem was able to develop on it through freemium business formats like in WordPress ecosystem. The plugin ecosystem of WordPress was estimated to have $1 bn volume a few years ago. And its quite streamlined in providing software and services at scale to the point of providing ordinary users and small businesses with features at price points they would not hesitate to pay. It does constitute an example for the rest of the Open Source world could follow or at least learn from.

Re:PhpBB 3.3.10 by nsonha on Tuesday February 07, 2023 @05:41PM (#34700901)
> There isn't any room for over optimization, there isnt any room for wasting the non-existent VC money

that is not the merit of PHP itself, more like characteristic of the period (when tech salary hasn't yet been inflated and consumer devices' computing power has not yet become abundant).

Re:PhpBB 3.3.10 by timeon on Monday February 06, 2023 @03:28AM (#34674778)
> When more options become available, people stop choosing PHP.

Probably rare but I had task to rewrite Node API to PHP because of deployment...

Re:PhpBB 3.3.10 by phendrenad2 on Monday February 06, 2023 @12:05AM (#34673578)
PHP has one great feature that makes it immortal. It's the only language that assumes that each code file is actually an HTML file. Try porting a simple PHP app to Ruby or Python and you'll see what a mess it becomes.
Re:PhpBB 3.3.10 by Wronnay on Monday February 06, 2023 @06:42AM (#34676077)
If you use a template system like Laravel Blade or Twig, like most modern PHP projects, then this feature of PHP isn't really used anymore and porting a PHP App to Ruby or Python isn't such a big deal anymore.

In my eyes, using something like Laravel takes away the "quick and dirty" aspect of PHP and adds a lot of things which have to be learned first, makes the project more stable and more comparable to a Python Django or Ruby on Rails project.

Re:PhpBB 3.3.10 by unity1001 on Monday February 06, 2023 @07:30AM (#34676389)
Its also why PHP and HTML mixed code templates are extremely fast for that reason. It was designed to be that way in order to solve the templating problem.
Re:PhpBB 3.3.10 by benatkin on Monday February 06, 2023 @01:26AM (#34674047)
Eh, it doesn't matter that I know PHP. I don't want to use it and have barely touched it in the last few years, despite understanding many of its quirks. I'm still using WordPress at the moment but if I have to write PHP I might just quit using it.

Such a simple question as whether something is passed by reference or by value shouldn't result in "This is a super interesting piece of information! Looks like it's true; but I couldn' find any official documentation supporting this fact. We also need to know which versions of PHP support this lazy copy concept. Anyone has more info?" https://stackoverflow.com/a/9740541/3461

Re:PhpBB 3.3.10 by PetahNZ on Monday February 06, 2023 @02:26AM (#34674392)
Are you asking what php version uses copy on write for arrays? If so, it's all of them (at least in the last decade). I have never known it not to do this.
Re:PhpBB 3.3.10 by benatkin on Monday February 06, 2023 @03:26AM (#34674759)
No, I'm not asking anything. I'm just saying that PHP doesn't have what I expect from a programming language and that I've chosen not to use it.
Re:PhpBB 3.3.10 by unity1001 on Monday February 06, 2023 @07:29AM (#34676380)
> which versions of PHP support this lazy copy concept

The price of a dedicated cpu is down to under $4 /month in common web hosts. Meanwhile the IO and other performance also improved so much that you dont ever, ever notice such things. So nobody cares about that kind of stuff. That's overoptimization that nobody asked for.

Re:PhpBB 3.3.10 by antifa on Tuesday February 07, 2023 @06:31PM (#34701539)
> Looks like it's true; but I couldn' find any official documentation supporting this fact.

The same user found the documentation after they bothered doing an interesting modern technique called "looking for it".

You'd have known that if you read the comment right after the one you copied.