What is the PHP language?

what are the functions of the PHP language and should I learn it to increase my employability?
I think php is used for connecting browsers for sites such as blogs and multiplayer games
(please correct me if I’m wrong)

I’m sure if you just search for it you can find the answers. Knowing a language is always a plus, but you might not like working with the language so that is something to consider (you would obviously have to know it before you can answer that question).

https://www.php.net/manual/en/intro-whatis.php
https://www.freecodecamp.org/news/search?query=PHP

Thanks a lot! I didn’t think of the Internet. I do think I’ll try to learn it, as I believe it has some functionality I want for a project.

PHP won’t necessarily increase your employability. Although it is still very prevalent around the Internet, it’s an old language and most companies starting new web apps won’t be using it. Although the best modern PHP framework is probably Laravel, even that is relatively niche compared to other languages/frameworks.

PHP isn’t really used for game development at all (that’s where C, C++, and C# shine) . But it is used for blogs, primarily through CMSes like WordPress, Drupal, Magento, Joomla, et al.

If you don’t already know PHP, I’d recommend avoiding it. Stick with JavaScript, and if you need to branch out to another language for back-end, learn Python or Ruby. And there are others I’d recommend way before PHP too - Golang, Rust, and C# are all trendier right now.

PHP is still used, in quite a few sectors and applications. It is a back-end language, much like Node.js or Python, that we can use to communicate with server-side services and provide an interface for client-side applications to consume.

Is it a thing you should learn? It really depends on what type of development you are interested in. If you’re working with any “legacy” code, then it is possible you’d encounter it. If you’re looking at getting into a new position with a newer company, look at their tech stack. If they refer to a LAMP stack (Linux/Apache/MySQL/PHP), then yes. If they refer to a MERN or MEAN stack (MongoDB/Express/Angular or React/Node.js), then PHP wouldn’t really help you.

But the flip side of the question might be, when you’re learning any language, why are you learning it? For me, my initial languages were all considerably older, and by the time I was working with PHP and perl, I was recognizing the patterns behind the language - defining a structure and spotting patterns allowed me to code in a more abstract way. So by the time I wanted to learn Ruby or Rust or Deno, it was more about “How do I apply these patterns I already know?” and less about “What is syntax and parsing and BWAAAH!!”

With whatever languages you learn, the language should be only part of what you learn. Learn the patterns behind the code, the ideas being implemented.

1 Like

thank you both for your insights.

astv99, is there a more modern language I can use to connect multiple browsers? It’s very important for a project I want to make.

snowmonkey, that is indeed an important part of learning. What I want is to create a multiple-browser site for my favorite RPG, but I don’t know what to use.

What do you mean by this?

I am not sure If I do understand it correct - but in case of: no language can “connect browsers”. Browsers are software “standalone”. PHP is a server-side language, plain Javascript can’t communicate with a server. But as alternative you can use node.js (server side aka backend communication). Also like mentioned Python or Java can handle backends. The answer for your question is in your project - what exactly do you want to achieve? This answer guides you to the best tools to do it.

PHP is still used and solid. It is an easier one to learn but with all the tolerance also a bit tricky in some services.

Sure it will, how can it not? PHP is still very much used all over the place and for each language you know your job opportunities go up (by some factor). In some countries, I’m fairly sure knowing PHP might even greatly increase your hiring chance, especially as a junior developer trying to get your feet wet, or as a freelancer.

PHP is one year older than JavaScript, I also don’t see how that is relevant. The C language is from 72 and it is still used. Hell even COBOL is and it’s from like 59.

However, you do have to prioritize in the beginning and I might not personally suggest learning PHP as your first language. I would start with JavaScript first and get the basics down and then learn PHP if you still want to.

2 Likes

In southamerica at least php still highly used, but mostly for CMS stuff. I think more than 60% of the online stores here are built with wordpress, which is written in php. Basically thats why php still on the market here, some bussiness require more complex workflows with php frameworks but there are just a few.

Anyway, as @lasjorg said, is not good to start learning with php. Php was my very first language and was painfull :exploding_head: . If you want to learn to work with wordpress, just the basics are OK to follow the wordpress codex and guides.

DanCouper and potsdam.rene,
what I meant was I wanted to allow for people to connect in real time, send POST demands for chatting, and enable game accounts.

lasjorg and raven666, PHP isn’t my first language - that was Processing.js

That’s all certainly true, but what I meant moreso was that PHP in itself may not be as valuable as learning a different language and may very well not be as useful as others depending on market/region.

This scenario is exactly what Node.js was designed for (real-time event processing).

PHP could work, Node could work. What I understood is that you want to send and receive content from a database (Account info, chat text, probably levels or anything that needs to be stored in. backend).

PHP → MySQL for big data is still a good combination in my opinion.
Node.js → MongoDB is another solution with NoSQL (but note: “No” means “not only” you can’t swim around of some sql lines).

The advantage for you to use node is that you already know javascript. PHP is not far away in syntax, etc (you’ll see it looks familiar) but node is a JS framework for backend and JS.

If think the main question to answer for you is what is more “tasty” for your project. The first thing my JS Teacher said was “Good Morning Guys, NEVER use JS for password” :smiley: I guess he would go for PHP/MySQL solution…

What’s Node.js and does freecodecamp offer a course on it?

Link: Node.js

I am not over-familiar with FCC courses but I guess they don’t. But you find a lot on YouTube channels and free on web. At least the website owns the full documentation about nodeJS as well as training and certification if you are interested: OpenJS Certification and Training Programs - OpenJS Foundation

nodeJS is designed to build network apps or in short it allows you to work backend.

1 Like

Yes: https://www.freecodecamp.org/learn/back-end-development-and-apis/

Node.js is a runtime environment that lets you write JavaScript on the back-end.

1 Like

thanks to all of you!

I would suggest you start with the JavaScript curriculum. Node.js is JavaScript so you need to learn that first.

I already know JavaScript, but I’ll take a look to see if I can learn anything I don’t know.
Thx.