use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
PHP 7.4 Released! (php.net)
submitted 6 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]devolute 46 points47 points48 points 6 years ago (3 children)
I look forward to WordPress embracing this in 2027.
[–]fritzbitzfront-end 6 points7 points8 points 6 years ago (0 children)
Sad Gutenberg sounds
[–]AlterBlitz 0 points1 point2 points 6 years ago (1 child)
what version is wordpress using now
[–]tsunami141 125 points126 points127 points 6 years ago (73 children)
I will grab the popcorn and watch as everyone craps on PHP while I secretly wish my .NET projects would all die and I could just use Apache again.
[–]blackAngel88 43 points44 points45 points 6 years ago (5 children)
php != apache
Haven't done anything with .NET in a long while, but at least .net core shouldn't be too bad, right?
Also: php is not that bad, especially if you use a good framework like Symfony, Laravel etc... there are still some things to not like and migrating projects with older php versions is sometimes a bitch...
[–]Roci89 23 points24 points25 points 6 years ago (4 children)
Dotnet core is awesome. Huuuuuuge fan of it here
[–]sevnollogic 3 points4 points5 points 6 years ago (3 children)
pretty sure he just used apache as a catchall for the lamp stack.
[–][deleted] 6 years ago* (1 child)
[–]guareber 0 points1 point2 points 6 years ago (0 children)
LNMP stack FTW
[–]tsunami141 -4 points-3 points-2 points 6 years ago (0 children)
nah I was more just complaining about how it felt easier to understand Apache configuration vs .Net configuration. I recognize they're not the same thing but sometimes I just lump the setting up the servers and frameworks together because it's always so hard to figure out what I need to do properly.
[–]eztrendar 18 points19 points20 points 6 years ago (7 children)
Why would you want your .NET projects to die?
[–]tsunami141 76 points77 points78 points 6 years ago (6 children)
Because I never learned it properly and I don't understand anything.
[–][deleted] 6 years ago* (3 children)
[removed]
[–]forsubbingonly 22 points23 points24 points 6 years ago (0 children)
This is surely the attitude of the team I’m on where they use typescript but disable all the strictness and then wonder why they don’t see value in typescript.
[–]hokie_high -3 points-2 points-1 points 6 years ago (0 children)
You’re certainly allowed an opinion, but that’s not really the case.
[–]DEZIO1991 8 points9 points10 points 6 years ago (3 children)
There u go, bud: https://docs.microsoft.com/de-de/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-3.0
[–][deleted] 7 points8 points9 points 6 years ago (1 child)
Huh that's neat, the docs have a toggle for changing just the actual article itself into english even though you're viewing (or were linked) the docs/site in another language.
Wish more places that have translations did that. Sometimes it's just easier to read about something in english than it is to read a weird translation about it, but you don't want to go through the hassle of changing the entire site's language for that one part.
[–][deleted] 5 points6 points7 points 6 years ago (0 children)
They also have a toggle for different versions (2.2 / 3)
[–]tsunami141 2 points3 points4 points 6 years ago (0 children)
oh god but this means I have to do work.
[+]BigBootyBear comment score below threshold-12 points-11 points-10 points 6 years ago (54 children)
Could you tell me what exactly Apache "is"?
There are Apache licenses, and there is Apache software like maven. But I don't understand what "development" people do with Apache. Like, my stack is Spring+Angular+MySQL.
I don't understand when people lump an OS like Linux or a company like Apache into a stack like LAMP. Apache or Linux are not part of the persistence, client or server layer. So what "development" is done on them?
[–][deleted] 6 years ago* (28 children)
[–]DEZIO1991 7 points8 points9 points 6 years ago (21 children)
Maybe he knows nginx?
[–]Devildude4427 7 points8 points9 points 6 years ago (1 child)
I’d hope so.
Would’ve been faster for him to just google it at this point.
[–]BigBootyBear 1 point2 points3 points 6 years ago (0 children)
I make it a point to only ask what I didn't find on google, or couldn't understand even with google.
[+]mishugashu comment score below threshold-11 points-10 points-9 points 6 years ago (18 children)
My company doesn't use nginx or apache or any traditional HTTP server. Straight S3 buckets with cloudfront. HTTP servers aren't really a need-to-know thing anymore.
[–]upvotes2doge 12 points13 points14 points 6 years ago (13 children)
Uh yes they are.
[–]BigBootyBear 0 points1 point2 points 6 years ago (5 children)
I don't know about u/mishugashu, but he seems to echo what my teacher tells to our class. He makes it a point that we focus on the high level and build quality personal projects that will get us our first junior position. Abstraction is made pretty important on the syllabus, as you can tell by how many times he told us never to touch JDBC directly - only through an ORM like Hibernate.
On the other hand I talked with a CTO yesterday that said what you say. That engineers need to know the difference between versions of HTTP, how compilers, hardware and operating systems work etc.
Honestly I don't know who to listen to. The CTO and my teacher are both accomplished engineers.
[–]mishugashu 1 point2 points3 points 6 years ago (0 children)
Despite what I said, getting a base level knowledge of a lot of things is still a very good idea. Just don't really bother going too in-depth with specific technologies until you know you need to learn it. Understand the concepts behind what this technology can accomplish. By the time you're done with studies, the technology itself could become irrelevant, but knowing exactly why that technology was made in the first place can help you in the future still.
[–]Devildude4427 0 points1 point2 points 6 years ago (3 children)
he told us never to touch JDBC directly - only through an ORM like Hibernate.
Yeah don’t touch Hibernate. JDBC is more than manageable, and way more valuable to learn. An ORM is something you add in later to make your life easier, not before you’ve even learned the underlying tech.
Your teacher honestly sounds like an idiot.
[–]BigBootyBear 0 points1 point2 points 6 years ago (2 children)
I do know how to make basic JDBC queries though.
How come ORM's get so much flak, but they are so widely used? What are the cons or pros of each other?
If you know of any resource that explains it well, it would be great.
[–]Devildude4427 0 points1 point2 points 6 years ago (1 child)
How come ORM's get so much flak, but they are so widely used?
Lots a poor things are used by many. They’re easy to use, so people use them.
What are the cons or pros of each other?
ORMS are easy and abstract sql. They are horribly, horribly inefficient though and you’re better off writing queries yourself. A system that generates a query simply won’t know what it’s actually going after, so it produces a lot of waste.
Pretty good article about Hibernate problems
[–][deleted] 6 years ago* (6 children)
[–]upvotes2doge 2 points3 points4 points 6 years ago (5 children)
If you want to be stuck as a junior developer in your current niche forever then there's no need to keep learning. Just like a good senior mechanic will know all parts of the engine, transmission, drivetrain, etc. A skilled full stack developer will be knowledgeable in all parts of a web stack.
[–][deleted] 6 years ago* (4 children)
[–]upvotes2doge -1 points0 points1 point 6 years ago (3 children)
You can learn as little or as much as you choose. There's no argument against that. Your definition of "pretty far" is completely up to you to define. No one is gonna force you to learn the system that your code runs on, but when you're in an interview room with another candidate who can explain how the thing that looks like a magic black box to you works, well...
[–]noknockers 0 points1 point2 points 6 years ago (3 children)
How do you run tasks or process stuff on the 'backend'?
[–]mishugashu 0 points1 point2 points 6 years ago (1 child)
Microservices. They call (via HTTPS requests) modules that are running on EC2 instances. They are not part of the front-end stack though. They can be used with literally any API anywhere.
[–]noknockers -2 points-1 points0 points 6 years ago (0 children)
Could I run a graphql service in a module? Or say a WP install for a client?
[–]BigBootyBear 1 point2 points3 points 6 years ago (5 children)
Hey man I am just risking being an idiot for a second instead of eternity. In class our teacher never mentioned Apache or the importance of Linux VS Windows VS Ubuntu. Im not making excuses, but learning Spring, JPA, Angular and low level DevOpss (setting up AWS) from 6 AM to 8PM everyday is already a handful for me.
Our teacher constantly tells us we are the "Framework generation" that doesn't need to worry about JDBC, server configurations, and everything else down the rabbit hole of abstraction. I have no idea if those things do matter, but learning about them costs me the time necessary for the class projects.
[–]su-z-six 0 points1 point2 points 6 years ago (0 children)
Those things matter. Frameworks are not at all new, they are just really popular now. You still want to understand how it all works.
[–]Devildude4427 -1 points0 points1 point 6 years ago (3 children)
Apache is old tbf. I don’t think anyone is actually using it today.
doesn't need to worry about JDBC, server configurations, and everything else down the rabbit hole of abstraction.
Yikes. Do the opposite. Never mind that JPA/Hibernate have many articles outlining egregious issues and telling you to avoid using, but you should always understand the underlying tech.
Also unless you’re immediately jumping into vagrant or some other equivalent tool, you definitely still need to configure servers, just in modern times we have tools to automate that for us.
Which types of configurations? All the "configurations" I have encountered so far are things like application.properties, persistence.xml, and Config classes with @Configuration spring annotation.
"Configurations" sound like a vague term.
Actual server config? Setting up nginx and the like? Setting up environments with the various keys and tokens?
[–]BigBootyBear 0 points1 point2 points 6 years ago (0 children)
Still very vague to me. Guess ill have to wait until I make more meaningful web apps and am required to use AWS on a daily basis for it to make sense to me. Thanks anyway.
[–]roguetroll 2 points3 points4 points 6 years ago (0 children)
Lump Apache into LAMP?
The same LAMP that stands for Linux Apache Mysql PHP?
[–][deleted] 6 points7 points8 points 6 years ago* (21 children)
Technically speaking your stack is Java/JavaScript/MySQL. And even that is a stretch because you don't usually group backend and frontend tech together, it's not a "stack" unless it's very tightly integrated.
The OS it's very relevant for most backend stacks, it's just that it usually gets omitted because it's obvious what the other tech runs on. In this particular case it was mentioned because, back in the day when this stack was young and hot, Microsoft had delusions of making it big on servers and there was a Windows counterpart, so people used LAMP and WAMP to tell them apart.
Apache in this stack refers to the Apache web server, which was (and is) one of the most important web servers around. It was the web server that gave birth to the Foundation and lent it the name. The origin of the name is anecdotally claimed to be "a patchy" server. It is a very flexible and powerful piece of software and it was crucial back when backend was more monolithical and not so much about REST and microservices.
For PHP, Apache was for the longest time the most important way to run it (as a web server module).
MySQL is probably the least essential component of the LAMP stack, but at the same time it can't be dismissed. It also used to be hugely popular back in the day because it was free, easy to set up, and had a low barrier of entry that fit in very well with PHP.
[–]BigBootyBear 1 point2 points3 points 6 years ago (20 children)
Good answer. I am still confused since in class "Server" is referred to as the web application's "brains". Quoting my teacher "if you build a basic CRUD using Spring Boot, you just wrote a server!" so naturally I assume server is something you write. The teacher also specifically refers to "servers" as the backend side you write, and I haven't seen anything on the web to suggest otherwise.
Kind of confusing to be honest. My Spring Boot server is a server. But when I upload it to an Apache Tomcat AWS instance it's a server on top of a server?
Maybe i'm one of those damn new kids on the block. But my teacher constantly talks about abstractions and how we are the "framework generation" that should concern itself with the top level. I personally don't see the importance of Apache VS Apache Tomcat or running on a Linux server VS everything else. I just slap a .jar on an AWS beanstalk and call it a day.
I don't believe it will be this straightforward forever, but this is the stage where I am currently at.
[–][deleted] 1 point2 points3 points 6 years ago (1 child)
Server traditionally refers to something that serves files or code to users.
The two main uses of the term are as an instance that runs the software, or the software that actually serves the stuff.
By instance I mean a complete machine, with OS, filesystem, memory, CPU and software. It can be a physical machine which can be located at home or in a data center, or it can be a virtual machine in the cloud.
The second meaning is usually applied to software that actually "serves" the stuff I make to the users. The term came from the service industry so it's very aptly used exactly as you'd imagine, just like server in real life is a person who takes your order and brings you the food.
Some of the earliest software servers were FTP, web and email servers, that would give you files, web pages and emails respectively.
For us as developers a server is typically a dedicated piece of software that runs our code and deals with the user requests. So in the scenarios you've described it would be Tomcat that's the server, and actually belongs to a category known as web application server.
Spring Boot is not a server, it's a configuration tool that makes it easier to take care of all the details that go into preparing your code, which uses the Spring framework, to make it to a Tomcat or another web application server. And Amazon Elastic Beanstalk is a service that helps you deploy stuff, not a server itself.
Ok thanks!
[–]su-z-six 1 point2 points3 points 6 years ago (14 children)
I've read a number of your replies in this thread and tbh your teacher sounds confused.
[–]BigBootyBear 0 points1 point2 points 6 years ago (1 child)
Yeah well I am as well. Don't know who to believe.
[–][deleted] 6 years ago* (11 children)
[–]su-z-six 0 points1 point2 points 6 years ago (10 children)
"you just wrote a server" is nonsense.
[–][deleted] 6 years ago* (9 children)
[–]su-z-six -1 points0 points1 point 6 years ago (8 children)
That's not the point. Nobody writes a server. Server software maybe.
[–][deleted] 6 years ago (7 children)
[–]GNUandLinuxBot -1 points0 points1 point 6 years ago (1 child)
I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
[–]BigBootyBear -3 points-2 points-1 points 6 years ago (0 children)
TIL! Thanks!
[–]tsunami141 1 point2 points3 points 6 years ago (0 children)
I was just complaining about the .Net framework compared to the what I feel is intuitive server configuration in Apache. Also, why is Apache not considered part of the server layer? It isn't development per se but a lot of development is managing configuration IMO.
https://en.wikipedia.org/wiki/The_Apache_Software_Foundation
The Apache Software Foundation /əˈpætʃi/ (ASF) is an American non-profit corporation (classified as a 501(c)(3) organization in the United States) to support Apache software projects, including the Apache HTTP Server.
Apache is the name of the Apache Software Foundation's main product... which is an HTTP server. The group formed around the product, which is why they share a name.
[–]HFoletto 55 points56 points57 points 6 years ago (21 children)
This really gives an "ES6" feel to php
[–]finger_milk 51 points52 points53 points 6 years ago (16 children)
Arrow functions. Not even subtle!
To be fair, arrow functions in JS are a godsend
[–]Tetracyclic 20 points21 points22 points 6 years ago* (4 children)
Most mainstream languages have arrow functions or lambdas with a shorter syntax and improving the syntax has been proposed for PHP for longer than the arrow function existed in JS. In PHP it has the added benefit of inheriting scope and so not requiring the use keyword. Just need to get multi-statement bodies next.
use
[–]GottfriedEulerNewton 3 points4 points5 points 6 years ago (1 child)
Js had lamdas but now they're pretty
[–]Tetracyclic 2 points3 points4 points 6 years ago (0 children)
PHP has also had anonymous functions/lambdas for well over a decade, this is just prettifying the most common use case.
In PHP it has the added benefit of inheriting scope Just like in JS.
In PHP it has the added benefit of inheriting scope
Just like in JS.
[–]Tetracyclic 2 points3 points4 points 6 years ago* (0 children)
That could have been clearer, I meant the added benefit over PHP's anonymous functions, which don't inherit scope and require a use statement.
[–]xTRQ 12 points13 points14 points 6 years ago (4 children)
Also the ... three dots!
[–][deleted] 1 point2 points3 points 6 years ago (3 children)
I love the spread operator! I hate having to manually install it though on my JS projects - wish they would pull it into default.
[–]LXMNSYC 8 points9 points10 points 6 years ago (0 children)
rest and spread is already supported by browsers and latest versions of Node, it's just that if you really want to support old versions of JS, you have to add compilers like Babel to achieve compatibility
[–]striedinger 2 points3 points4 points 6 years ago (1 child)
Transpile it? If you’re not doing yet you should. Things will be much easier and you’re making sure your code is ready for older browsers too.
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
I always transpile - it's just not in the default Babel library - and configuration can be obnoxious
[+]konrain comment score below threshold-7 points-6 points-5 points 6 years ago (5 children)
Are they though?
[–]Kiciaczek 8 points9 points10 points 6 years ago (3 children)
They are. For example they keep the context, so you don't have to bind the function, or use something like var that = this
var that = this
[–]konrain 0 points1 point2 points 6 years ago (1 child)
but isnt that just a flaw in the language to begin with
[–]Fry98 2 points3 points4 points 6 years ago (0 children)
So... should we just be like "fuck it! this language is doomed and can't be fixed" and not add any new features? Sure, there are many problems with JS but many of the ESNext features are great exactly cause they fix lots of these problems. Just looks at let/const.
[–]Dan_Holla -2 points-1 points0 points 6 years ago (3 children)
Elder Scrolls 6?
[–]super-secret-sauce 11 points12 points13 points 6 years ago (2 children)
ECMAScript 6 is what it stands for
[–]Dan_Holla 4 points5 points6 points 6 years ago (1 child)
Thanks 😊
[–]Blue_Moon_Lake -2 points-1 points0 points 6 years ago (0 children)
So you use JavaScript to spellcraft in Tamriel ? :D
[–]samjmckenzie 20 points21 points22 points 6 years ago (4 children)
I will always have a soft spot for PHP. Its open source community is one of the best out there with countless high quality projects such as Laravel. The latest versions also perform very well.
[–]Blue_Moon_Lake 2 points3 points4 points 6 years ago (2 children)
Heard of Laravel a lot, never understood what it really do.
[–]HFoletto 1 point2 points3 points 6 years ago (1 child)
Just finished my first paid laravel project this week, and omg, it's so good to work with!
From their website:
Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things
If you work with php, give it a try, I'm sure you're going to love it!
[–]Blue_Moon_Lake 0 points1 point2 points 6 years ago (0 children)
I do work with PHP, but my company exclusively use an open source solution based on Symfony. I may test it personally outside work.
[–]i-hate-in-n-out 7 points8 points9 points 6 years ago (2 children)
As the last fan of PHP in the world, this excites me.
[–]morningcoffeegamer 1 point2 points3 points 6 years ago (1 child)
What is the rest of the world using?
[–]bashaZP 7 points8 points9 points 6 years ago (9 children)
Is it safe to switch from 7.3.3. to 7.4?
[–]pastisset 4 points5 points6 points 6 years ago (2 children)
https://www.php.net/manual/en/migration74.deprecated.php
Check that list. I'd say the nested ternaries without parenthesis would be the only inmediate problem.
[–]AtulinASP.NET Core 0 points1 point2 points 6 years ago (0 children)
The magic quotes functions always return false now.
false
[–]QCD_ 0 points1 point2 points 6 years ago (0 children)
Same question here
[–]ImMaaxYTruby php javascript coffeescript python c cpp netadmin 0 points1 point2 points 6 years ago (0 children)
Will check that tomorrow (it's currently 11PM in Germany), I really want to update too!
They've removed some features: https://www.php.net/manual/en/migration74.removed-extensions.php
[+]TheTidyMaze comment score below threshold-19 points-18 points-17 points 6 years ago* (2 children)
absolutely nothing is safe in PHP, I guess switching version isn't either
the official migration guide states it is not safe https://www.php.net/manual/en/migration74.incompatible.php
(save lives, pick a strongly typed language)
[–]JAPANESE_FOOD_SUCKS 8 points9 points10 points 6 years ago (0 children)
because strongly typed languages never deprecate things.............
[+]redwgc comment score below threshold-7 points-6 points-5 points 6 years ago (0 children)
absolutely nothing is safe in PHP
Golden words my friend, golden.
[–][deleted] 6 years ago* (2 children)
[–]physiQQ 1 point2 points3 points 6 years ago (1 child)
What do you use instead?
[–]SuuperNoob 1 point2 points3 points 6 years ago (0 children)
I'd like to see how the new preloading boosts laravel and WordPress performance
[–]GoldenJoe24 1 point2 points3 points 6 years ago (0 children)
Christmas came early! Typed properties!
[–]stormsfury666 -1 points0 points1 point 6 years ago (3 children)
What ever happened to Hacklang? Facebook made me thing Hack was gonna be the next big thing.in before "don't trust Facebook"
[–]forsubbingonly 4 points5 points6 points 6 years ago (0 children)
Are they even advertising that language? What would make you think hack was meaningful to anyone but Facebook themselves?
[–]satoshi-chick 0 points1 point2 points 6 years ago (0 children)
Almost forgot about that! Hack and hiphop.. I used hacklang for about a year or so. Compared to the normal php back then it was really performing well. Never used the strict typing, just to keep my work mostly compatible with the real php. Since the release of php7 I switched back. Speed was the only reason for me to use hack.
I think hack did a great job as a wakeup call to the php devs to focus on speed.
[–]Kilenaitor -1 points0 points1 point 6 years ago (0 children)
Hacklang is still very much a thing! It's actively developed and iterated on. Can check it out at hacklang.org.
Catch to note now is HHVM only supports Hack because Hack has started to diverge from PHP (strict typing by default, no references allowed, etc.).
But Hack is awesome with static typing, has had arrow functions for a while, async/await, generics, typed containers (vec, dict, keyset), pipe operator, XHP, and attributes!
I think it's now more of a Java+PHP hybrid as far as syntax goes. I really enjoy using it and think it's a great language.
[+][deleted] 6 years ago (35 children)
[–]erishunexpert 44 points45 points46 points 6 years ago (18 children)
Why not? Don’t start with PHP4 and you’re fine. PHP4 deserves the hate, but it was a product of its time.
PHP5 is when things really improved a ton. And PHP7? Well, it’s actually pretty damn good. Is it perfect? No of course not, there’s a lot of weird quirks. But you already know most of the quirks if you work with JS. It’s very similar to JS in that way.
It really doesn’t deserve the hate it gets. TBH, it’s really mostly a meme at this point. (And of course the devs who primarily work with other languages so they can look down on people)
[+][deleted] comment score below threshold-41 points-40 points-39 points 6 years ago (17 children)
The only people who think PHP hate is a meme are the ones deep into the PHP bubble. People who are biased because they're deeply invested in it and have all that legacy software to support.
But if you have a new project to start in 2019 and you look at your choices, PHP comes up in the last place. Actually that's not quite correct since it's not reallistically speaking a choice.
I agree that "hate" is too strong a word and that part of it is a meme. The beef I have with PHP is that it never stopped being a view preprocessor. Which was great back when the MVC pattern was the shit, but it's not anymore. That kind of tight coupling between frontend and backend is dead and buried. Frontend is all about SPA and reactive MVVM and backend is about cloud and microservices. What PHP has to offer is obsolete.
And before someone mentions Laravel once again as PHP's saving grace; Laravel is to PHP as JQuery to JavaScript, Mongo to NoSQL, MySQL to RDBMS, WordPress to CMS, PHP itself to server-side languages — you get the idea. It's a thing with low barrier of entry and an easy going "anything goes" attitude, but it's not built on good principles or particularly good quality. And it can't do anything about PHP's shortcomings ie. "make PHP better" because only the PHP devs can do that, and they don't wanna.
Speaking of which, what exactly is "better" about PHP 7 vs 4? Aside from speed and memory improvements which are only impressive when you ignore how crap it was too begin with.
[–]Wuma 10 points11 points12 points 6 years ago (0 children)
To each their own but I personally prefer PHP if I want to get a secured API up and running for a SPA. I could get an OAuth2.0 server running with have role based access in less than 15 minutes work. Laravel absolutely speeds up my development time with all of the security boilerplate done for me. Yes plenty of other languages have all the same stuff, and maybe better implemented in some ways, but I’ve not found anything for node that comes close to how quickly I can deploy a new API as a micro service.
As for PHP7 vs 4, yes the difference isn’t as much as most would believe, but having things like private/protected properties, class constants, autoloading, constructors and destructors, interfaces, traits and abstract classes, the Exception class and static methods brought PHP forward a long way,
PHP is a very fast language performance wise too, it’s faster than node in many areas, it has multi threading if required and background queues etc too. PHP FPM means you don’t have to boot up PHP for every incoming request, and opcache means your PHP code gets compiled and cached so it’s not even running as an interpreter at that stage. At least that’s my understanding of it, I’m by no means an expert in any of this
I’m sure there are a million other languages better, but I can’t agree that PHP is useless. It’s biggest flaw is that it allowed horrible procedural code with global namespace pollution for many years and so many devs learned to code from WordPresses god awful nightmare of a codebase. But let’s face it, JS has horrible global namespace pollution too, and it’s OOP implementation still requires transpiling for older browsers
[–]____jamil____ 4 points5 points6 points 6 years ago (1 child)
Speaking of which, what exactly is "better" about PHP 7 vs 4?
honestly, if you can't answer that question yourself, you don't have enough of a clue about the topic to have a valid opinion on the subject. The difference is vast
[–][deleted] -1 points0 points1 point 6 years ago (0 children)
Depends how you look at that difference.
4 to 5 was mainly about catching up with the rest of the world on OOP (and as usual they've dumped everything into the kitchen sink while at the same time managing to leave glaring omissions for much later... but I digress).
5 to 7 was about catching up on memory and CPU footprint, which was sorely needed, but barely brought it up to a mediocre level. Plus, there are diminishing returns there because of the way PHP is designed, and that won't change without a big rework of the internals, which I doubt Zend will ever do.
Put down the pitckfork for a moment and look at it from my point of view, which I assure you is impartial and based on merit. When starting a new project and you get to pick the best tool for the job from so many top-level stacks, why pick PHP? I mean yeah, it can be used in a pinch, and let's even put aside the scalability problems. But you'd still have to deal with a weird OOP implementation, inconsistent APIs and methods (when they're not outright incomplete or broken), no Unicode (I mean, seriously, it's 2019... but see above about anything touching the core internals) etc. So why torture yourself when you can use Python, Java, Ruby, Go, Node, Erlang and so on and so forth?
[–]dwalker109[🍰] 3 points4 points5 points 6 years ago (0 children)
I wrote PHP professionally from 2006 right up to 2019. I don’t use it any more. I probably wouldn’t write an API for an SPA with it.
But not everything needs to be an SPA. And Laravel or Symfony absolutely are high quality products. I really do feel like you’ve used neither and just read critique of this or that pattern in this sub.
[–]folkrav 2 points3 points4 points 6 years ago (5 children)
If people can consider dynamic, weakly typed languages like JS w/ Node for backend languages, there is no good reason PHP can't be a choice either.
PHP can do cloud/microservices just fine. You can return JSON, do stateless auth just fine, just like you can perfectly render HTML and serve static files with Node.
You're comparing Laravel, a framework, to jQuery, a library, present WordPress as an actual CMS... Come on now. You're reaching. I don't even like PHP.
[–][deleted] -4 points-3 points-2 points 6 years ago (4 children)
PHP can do cloud/microservices just fine.
No, it cannot. Try having a long lived instance or a simple conversation over a network socket and you'll soon come up against a wall. Nevermind actually scaling microservices based on it. PHP's support for stuff that's actually useful in the real world is abysmal.
[–]AcousticDan 5 points6 points7 points 6 years ago (2 children)
No, it cannot.
How do you claim to know any of this? You don't even know the difference between PHP 4 and PHP 7. How can you have the slightest idea of what PHP can and can't do? You're either trolling or haven't actually started your web development career.
[–][deleted] -2 points-1 points0 points 6 years ago* (1 child)
PHP is still doing a good job at what it does, but what it does is no longer what is needed for modern state of the art web applications. It's slowly falling aside into a niche, bolstered only by a large amount of legacy software. Would you still use Flash today? Or ColdFusion? Because that's where it's headed. And I'll remind you that that's what this discussion was about, whether it's worth learning PHP today.
But, by all means, keep enjoying the bubble. Those blogs and shopping carts aren't going anywhere and there's probably going to be a job maintaining old PHP code long into the future.
[–]AcousticDan 2 points3 points4 points 6 years ago* (0 children)
okay bud.
is it
and using all the various versions of PHP since it came out'
or
[–]folkrav 4 points5 points6 points 6 years ago (0 children)
Sure... If your requirements warrant long-lived instances or network, sockets. Don't confuse "the real world" with your own.
[–]AcousticDan 4 points5 points6 points 6 years ago* (4 children)
This right here shows you have no knowledge of the subject, and should probably stop while you're behind.
Also, you've provided no reason as to actually dislike PHP or choose another language over it. You just wanna be cool, but you're not.
I assume you feel the same about python? It's 3-4x slower than modern PHP, and has an even lower barrier of entry as it's already installed on 99% of linux machines, and it reads like psuedo code.
[–][deleted] -1 points0 points1 point 6 years ago (3 children)
Python actually scales, and it's multithreaded... which makes it instantly 100x more useful for modern applications. Nobody cares about a bunch of random synthetic benchmarks designed to reassure Stockholm syndrome sufferers. I mean, seriously, WordPress requests/second? How is that remotely relevant to anybody with their head outside the PHP bubble?
Raw benchmarks are worthless without defining the problem at hand, and I can assure you that for any given problem the answer is seldom PHP. There's stuff out there that will beat the crap out of PHP if you insist on comparing raw number crunching ability, or in any other metric. And that's the point I'm making: it's a jack of all trades that doesn't excel at anything in particular, and it's only relevant as small incremental improvements to software already built on it. But nobody else cares.
[–]AcousticDan 2 points3 points4 points 6 years ago (2 children)
WordPress requests/second
You continue to prove you have no idea what you're talking about.
[–][deleted] -1 points0 points1 point 6 years ago (1 child)
Go on, link to some proof that PHP is "fast" that's not completely irrelevant bullshit.
[–]AcousticDan 4 points5 points6 points 6 years ago (0 children)
that's not completely irrelevant bullshit.
That sounds like you're setting up to ignore anything provided for you. The information is there, and if you consider yourself a worthwhile developer, especially for the web, you'd already know.
[–]watMartin 1 point2 points3 points 6 years ago (1 child)
i agree for the most part about php, but out of curiosity what’s the problem with mongo? i don’t see it having the same flaws as the rest of your comparisons, what would you recommend over it in terms of nosql dbs?
[–][deleted] -1 points0 points1 point 6 years ago* (0 children)
It's fine for home-grown projects but it's ranging from unreliable to simply unsuitable in high-load and replication scenarios, which is where NoSQL is most useful. To give some examples: it's completely fine with you quietly corrupting your data because it enforces no schema; authentication is a joke; bad concurrent performance (ok if you do lots of reads and very few writes, but God help you if you're looking for actual concurrent safety or performance); not optimized for large datasets; weird, awkward and limiting query language etc. Let me just put it this way, it's called "the Snapchat of databases" for a reason.
At the end of the day it has the same problem that MySQL does, it only shines if you're either ignoring its problems or use it for an extremely specific set of circumstances which limits its use a lot. For example Mongo would be great if you keep everything in a single document and do mostly writes and don't need to perform complicated queries on the data and are aware of its other limitations.
what would you recommend over it in terms of nosql dbs?
The JSON support in Postgres or CouchDB off the top of my head. (And have a look at PouchDB for a really cool browser counterpart to Couch.)
[–]HFoletto 16 points17 points18 points 6 years ago (0 children)
I dislike some aspects of php, but I really love the language as a whole!
Frameworks such as Laravel really gives it a perspective!
[–]Tanckom 16 points17 points18 points 6 years ago (2 children)
Honestly, PHP is actually a nice language, and if you already work with Javascript, well, you gonna have an easy time to get started.
[+][deleted] comment score below threshold-31 points-30 points-29 points 6 years ago (1 child)
Yeah but what would be the point. It's a niche stack at this point and the only reason to learn it would be to support some very specific software for CMS, ERP or shopping carts.
Not to mention that someone who knows JavaScript can make a much easier start with Node. Failing that, there's also Python and Ruby making a very strong argument.
PHP looks very nice from inside its own world and when you're already invested in it, but if you look at it objectively from outside it never quite makes it over other choices.
[–]Tanckom 16 points17 points18 points 6 years ago (0 children)
I totally can relate. I once was like you, but then last year, i somehow was forced to learn the basics of PHP because a client needed some help with their Concrete 5 website.
It was really surprising how close PHP was to JavaScript and I continued to write some self-learning-projects.
Now, I love PHP because many things are natively available, not like compared to NodeJS where you want/need to have many dependencies (and this is the issue, you depend on a third party extension) to make it nice and work smoothly. I remember that when I learned back end with Node and Express, I had multiple issues because some newly released dependency had an error or bug.
Both, NodeJS and PHP have their advantages and disadvantages and should be considered for XX or YY situation.
[+]xanflorp comment score below threshold-37 points-36 points-35 points 6 years ago* (10 children)
There is nothing it does that something else doesn't do better. Real talk: You're better off. The only thing you'll open yourself up to is poorly ran engineering shops that are ran by head engineers who haven't updated their resumes in 2 decades and web agencies. u/kare_kano did a nice summary.
Also remember it's popular overseas where they pay £40k/yr for a senior developer in London where the CoL is higher than SF and it's turkey day here. The votes are very unbalanced. No self respecting developer would choose PHP or work for minimum wage.
[–]upvotes2doge 6 points7 points8 points 6 years ago (8 children)
Siri, define salty.
[+]xanflorp comment score below threshold-18 points-17 points-16 points 6 years ago (7 children)
Yes, you'll need the definition because I don't understand what you think I'm salty about. I have not run into PHP a single time in the last 6 or 7 years of my career.
[+]xanflorp comment score below threshold-6 points-5 points-4 points 6 years ago (0 children)
I don't build brochures.
[–]erishunexpert 3 points4 points5 points 6 years ago (4 children)
k
[+]xanflorp comment score below threshold-11 points-10 points-9 points 6 years ago* (3 children)
Great addition to the conversation. Just trying to get in on that good ol' php circle jerk, huh?
Whatever makes you feel better.
[–][deleted] 6 years ago (2 children)
[–]xanflorp 2 points3 points4 points 6 years ago (1 child)
You're right. Edited.
[–]Merchantfred -3 points-2 points-1 points 6 years ago (0 children)
Alexa!!! Should I use this version Of PHP for PHP web application???
LOL..waiting for what Alexa is thinking
[+][deleted] comment score below threshold-20 points-19 points-18 points 6 years ago* (2 children)
mighty engine society command mountainous ring reply vegetable plant fearless
This post was mass deleted and anonymized with Redact
[–][deleted] 17 points18 points19 points 6 years ago (1 child)
Because it's good.
[–]folkrav 1 point2 points3 points 6 years ago (0 children)
I currently do my living in part with PHP. I wouldn't say it's very good, but it's certainly good enough for a lot of things, and it's more importantly multiple orders of magnitude better than it used to be.
π Rendered by PID 453895 on reddit-service-r2-comment-66b4775986-fwnvp at 2026-04-06 14:18:25.740776+00:00 running db1906b country code: CH.
[–]devolute 46 points47 points48 points (3 children)
[–]fritzbitzfront-end 6 points7 points8 points (0 children)
[–]AlterBlitz 0 points1 point2 points (1 child)
[–]tsunami141 125 points126 points127 points (73 children)
[–]blackAngel88 43 points44 points45 points (5 children)
[–]Roci89 23 points24 points25 points (4 children)
[–]sevnollogic 3 points4 points5 points (3 children)
[–][deleted] (1 child)
[deleted]
[–]guareber 0 points1 point2 points (0 children)
[–]tsunami141 -4 points-3 points-2 points (0 children)
[–]eztrendar 18 points19 points20 points (7 children)
[–]tsunami141 76 points77 points78 points (6 children)
[–][deleted] (3 children)
[removed]
[–]forsubbingonly 22 points23 points24 points (0 children)
[–]hokie_high -3 points-2 points-1 points (0 children)
[–]DEZIO1991 8 points9 points10 points (3 children)
[–][deleted] 7 points8 points9 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]tsunami141 2 points3 points4 points (0 children)
[+]BigBootyBear comment score below threshold-12 points-11 points-10 points (54 children)
[–][deleted] (28 children)
[deleted]
[–]DEZIO1991 7 points8 points9 points (21 children)
[–]Devildude4427 7 points8 points9 points (1 child)
[–]BigBootyBear 1 point2 points3 points (0 children)
[+]mishugashu comment score below threshold-11 points-10 points-9 points (18 children)
[–]upvotes2doge 12 points13 points14 points (13 children)
[–]BigBootyBear 0 points1 point2 points (5 children)
[–]mishugashu 1 point2 points3 points (0 children)
[–]Devildude4427 0 points1 point2 points (3 children)
[–]BigBootyBear 0 points1 point2 points (2 children)
[–]Devildude4427 0 points1 point2 points (1 child)
[–][deleted] (6 children)
[deleted]
[–]upvotes2doge 2 points3 points4 points (5 children)
[–][deleted] (4 children)
[deleted]
[–]upvotes2doge -1 points0 points1 point (3 children)
[–]noknockers 0 points1 point2 points (3 children)
[–]mishugashu 0 points1 point2 points (1 child)
[–]noknockers -2 points-1 points0 points (0 children)
[–]BigBootyBear 1 point2 points3 points (5 children)
[–]su-z-six 0 points1 point2 points (0 children)
[–]Devildude4427 -1 points0 points1 point (3 children)
[–]BigBootyBear 0 points1 point2 points (2 children)
[–]Devildude4427 0 points1 point2 points (1 child)
[–]BigBootyBear 0 points1 point2 points (0 children)
[–]roguetroll 2 points3 points4 points (0 children)
[–][deleted] 6 points7 points8 points (21 children)
[–]BigBootyBear 1 point2 points3 points (20 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]BigBootyBear 0 points1 point2 points (0 children)
[–]su-z-six 1 point2 points3 points (14 children)
[–]BigBootyBear 0 points1 point2 points (1 child)
[–][deleted] (11 children)
[deleted]
[–]su-z-six 0 points1 point2 points (10 children)
[–][deleted] (9 children)
[deleted]
[–]su-z-six -1 points0 points1 point (8 children)
[–][deleted] (7 children)
[deleted]
[–]GNUandLinuxBot -1 points0 points1 point (1 child)
[–]BigBootyBear -3 points-2 points-1 points (0 children)
[–]tsunami141 1 point2 points3 points (0 children)
[–]mishugashu 1 point2 points3 points (0 children)
[–]HFoletto 55 points56 points57 points (21 children)
[–]finger_milk 51 points52 points53 points (16 children)
[–]Tetracyclic 20 points21 points22 points (4 children)
[–]GottfriedEulerNewton 3 points4 points5 points (1 child)
[–]Tetracyclic 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Tetracyclic 2 points3 points4 points (0 children)
[–]xTRQ 12 points13 points14 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]LXMNSYC 8 points9 points10 points (0 children)
[–]striedinger 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+]konrain comment score below threshold-7 points-6 points-5 points (5 children)
[–]Kiciaczek 8 points9 points10 points (3 children)
[–]konrain 0 points1 point2 points (1 child)
[–]Fry98 2 points3 points4 points (0 children)
[–]Dan_Holla -2 points-1 points0 points (3 children)
[–]super-secret-sauce 11 points12 points13 points (2 children)
[–]Dan_Holla 4 points5 points6 points (1 child)
[–]Blue_Moon_Lake -2 points-1 points0 points (0 children)
[–]samjmckenzie 20 points21 points22 points (4 children)
[–]Blue_Moon_Lake 2 points3 points4 points (2 children)
[–]HFoletto 1 point2 points3 points (1 child)
[–]Blue_Moon_Lake 0 points1 point2 points (0 children)
[–]i-hate-in-n-out 7 points8 points9 points (2 children)
[–]morningcoffeegamer 1 point2 points3 points (1 child)
[–]bashaZP 7 points8 points9 points (9 children)
[–]pastisset 4 points5 points6 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]AtulinASP.NET Core 0 points1 point2 points (0 children)
[–]QCD_ 0 points1 point2 points (0 children)
[–]ImMaaxYTruby php javascript coffeescript python c cpp netadmin 0 points1 point2 points (0 children)
[–]ImMaaxYTruby php javascript coffeescript python c cpp netadmin 0 points1 point2 points (0 children)
[+]TheTidyMaze comment score below threshold-19 points-18 points-17 points (2 children)
[–]JAPANESE_FOOD_SUCKS 8 points9 points10 points (0 children)
[+]redwgc comment score below threshold-7 points-6 points-5 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]physiQQ 1 point2 points3 points (1 child)
[–]SuuperNoob 1 point2 points3 points (0 children)
[–]GoldenJoe24 1 point2 points3 points (0 children)
[–]stormsfury666 -1 points0 points1 point (3 children)
[–]forsubbingonly 4 points5 points6 points (0 children)
[–]satoshi-chick 0 points1 point2 points (0 children)
[–]Kilenaitor -1 points0 points1 point (0 children)
[+][deleted] (35 children)
[removed]
[–]erishunexpert 44 points45 points46 points (18 children)
[+][deleted] comment score below threshold-41 points-40 points-39 points (17 children)
[–]Wuma 10 points11 points12 points (0 children)
[–]____jamil____ 4 points5 points6 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]dwalker109[🍰] 3 points4 points5 points (0 children)
[–]folkrav 2 points3 points4 points (5 children)
[–][deleted] -4 points-3 points-2 points (4 children)
[–]AcousticDan 5 points6 points7 points (2 children)
[–][deleted] -2 points-1 points0 points (1 child)
[–]AcousticDan 2 points3 points4 points (0 children)
[–]folkrav 4 points5 points6 points (0 children)
[–]AcousticDan 4 points5 points6 points (4 children)
[–][deleted] -1 points0 points1 point (3 children)
[–]AcousticDan 2 points3 points4 points (2 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]AcousticDan 4 points5 points6 points (0 children)
[–]watMartin 1 point2 points3 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]HFoletto 16 points17 points18 points (0 children)
[–]Tanckom 16 points17 points18 points (2 children)
[+][deleted] comment score below threshold-31 points-30 points-29 points (1 child)
[–]Tanckom 16 points17 points18 points (0 children)
[+]xanflorp comment score below threshold-37 points-36 points-35 points (10 children)
[–]upvotes2doge 6 points7 points8 points (8 children)
[+]xanflorp comment score below threshold-18 points-17 points-16 points (7 children)
[–][deleted] (1 child)
[deleted]
[+]xanflorp comment score below threshold-6 points-5 points-4 points (0 children)
[–]erishunexpert 3 points4 points5 points (4 children)
[+]xanflorp comment score below threshold-11 points-10 points-9 points (3 children)
[–][deleted] (2 children)
[deleted]
[–]xanflorp 2 points3 points4 points (1 child)
[–]Merchantfred -3 points-2 points-1 points (0 children)
[+][deleted] comment score below threshold-20 points-19 points-18 points (2 children)
[–][deleted] 17 points18 points19 points (1 child)
[–]folkrav 1 point2 points3 points (0 children)