I like PHP, one issue which I face with PHP though is, that it is difficult to create a self-contained docker image. With node.js or java spring boot i can build an application with an http endpoint and create a single docker image with all included easily. With php I need 2 distinct containers, e.g., nginx, php-fpm and the code mounted on a volume to the the containers. So it seems to be more difficult for setup and…
An Internet of PHP
161–170 of 333 posts
Re: An Internet of PHP
#162Earlier quoted context omitted.
Can you explain why you think it’s an awful language? It definitely used to be lacking in features, but the improvements in the recent versions have been great.
Developer experience is awful. Variable names starting with $, heavy object orientism that seems like an after thought, tooling ecosystem is subpar, standard library is a joke, etc It’s a pile of crap and that’s my opinion
Re: An Internet of PHP
#163Re: An Internet of PHP
#164Earlier quoted context omitted.
Modern PHP may as well be a new language. But then node came along. It's almost like PHP users couldn't stand a clean ecosystem.
I don't think the language is the problem. As bad as it is, it is certainly more well thought that the original JavaScript. But PHP is used mostly by "businesses" with no budget and this is essentially the absolute rock-bottom of the "software" industry.
Re: An Internet of PHP
#165Ironically enough, if people actually tried PHP, many would be amazed, especially at the quality frameworks. Productivity is very high in something like Laravel, and compared to JavaScript frameworks PHP frameworks are much more feature complete and well though out. I'm a big fan of trying out different stacks, and I think a lot of people would love Laravel if they tried it. Give it a shot using PHPStorm and Laravel…
Not to say it's bad, but even with some experience, I couldn't grok it.
Re: An Internet of PHP
#166For those of you who are proponents of other web ecosystems, I’m curious what benefits you enjoy? What framework or language do you use and what makes it great? I use PHP everyday but we definitely have a lot to learn from others.
- Better libraries and frameworks overall
- Better programmers overall, so more competent colleagues
- Relevant in many fields outside web development
- Allows to learn and use various paradigms, like async/multithread/multiproc...
I do keep track of PHP improvements. In fact, I keep a small personal toy framework as a way to test its new features. Some of these were very much welcomed, like safe mode + runtime typing. But some of these were just catch-ups and none of these are compelling enough so that I would want to start a new project in PHP.Other ecosystem I'm interested in is Go, for other reasons.
Re: An Internet of PHP
#167I like PHP, one issue which I face with PHP though is, that it is difficult to create a self-contained docker image. With node.js or java spring boot i can build an application with an http endpoint and create a single docker image with all included easily. With php I need 2 distinct containers, e.g., nginx, php-fpm and the code mounted on a volume to the the containers. So it seems to be more difficult for setup and…
PHP has had a built-in web server since version 5. People use Apache or nginx because they want to, but because they need to.
Unfortunately it has some really opinionated routing rules with certain file extensions, preventing you from having a dynamic URL with something like a .json or a .xml extension. Instead it will always try to look up a static file of that and serve it instead.
I can’t find the bug tracker issue for it but it was closed out with a message along the lines of “don’t use the built in web server for anything besides a toy”.
Luckily there are plenty of PHP Cli based web servers now that some other commenters have mentioned.
Re: An Internet of PHP
#168As an ex-PHP developer (almost 10 years now), I do not miss it. As a language, it is a scripting language with an okay interpreter. But as an eco-system, it is a hot mess. It has both the worst software developers (and I was one of them) as well as the worst clients (and the cheapest, regardless of geography). It is not a surprise that PHP is running the web. That's because WordPress made sites/e-commerce accessible…
This just reminds me of what originally got me into PHP as a teenager. Creating a site for our gaming community in PHP-Nuke was all too easy. Extending it with plugins, and eventually writing my own plugins to show live data from our game server. Now I look back on PHP3/PHP4 with disgust. Globals, function names, massive pieces of code right in the middle of HTML, shell_exec.
And they're not inherently bad.
PHP made the internet fun. Anyone could get going with a PHP enabled host with by creating an HTML document starting with and have a working something that the world could see by end of the day.
Today's web development feels like such a drag. In that you need to choose the scaffolding, create the scaffolding, wait for the concrete to dry, drill holes for the infrastructure and then construct the infrastructure.
When you then go to connect the infrastructure you find that one of the girders has buckled which requires a patch-up or refactor. Someone's misprinted the blue-prints and the cable ferret has gotten lost down one of the connectivity holes. You then discover that a new scaffolding company has come to town so your construction is now obviously out of date.
PHP enabled you to have something cool in days. Nowadays you spend days just trying to setup react. my two cents.
Re: An Internet of PHP
#169Ironically enough, if people actually tried PHP, many would be amazed, especially at the quality frameworks. Productivity is very high in something like Laravel, and compared to JavaScript frameworks PHP frameworks are much more feature complete and well though out. I'm a big fan of trying out different stacks, and I think a lot of people would love Laravel if they tried it. Give it a shot using PHPStorm and Laravel…
Re: An Internet of PHP
#170Earlier quoted context omitted.
> The ability to interleave code and HTML was also tacky and never taken seriously And yet people would take a bullet for React and the JSX templates.
I too find this hilarious. Not because I want to defend PHP, but moreso that I personally sort of despise react and it's whole ecosystem. I've never liked writing code less than when dealing with a spaghetti monster react app.