Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

PHP What can PHP be used for?

Malcolm

Administrator
Administrator
Staff Team
Code Plus
Company Plus
What can PHP be used for? Is it just for websites or can I use it to build apps?
 
Any type of CMS. Forums are all made by PHP that I know of. Wordpress is made by php. Actually procedural for Wordpress versus Xenforo 2's object oriented. It can be used for all kinds of things. You can even make desktop applications if you use a certain setup. I forgot what it's called but it is possible though it wasn't meant for that. Mostly if you want to go down that path of a desktop app without C++, C, or C#, VB then you could use javascript with something called Electron.

But yes you can use PHP to build apps.
 
PHP is a server side programming language, is that correct? It helps with sending emails, communicating with the database for like login information etc.

Actually procedural for Wordpress versus Xenforo 2's object oriented.

What's the deference between Procedural and Object oriented?
 
PHP is a server side programming language, is that correct? It helps with sending emails, communicating with the database for like login information etc.



What's the deference between Procedural and Object oriented?

It is server-side. Object oriented is mostly class based and consist of methods targeting based on classes. Procedural is the original form of PHP programming and is mainly used for CMS like wordpress.
 
PHP can be run outside servers via a command line interface for general purpose scripting. It is however optimized primarily for use in scripting web servers to create dynamic webpages. It isn't really the right technology to use for anything. Its primary advantage is its ease to deploy once on a web server.
 
OOP is actually really nice once you're familiar with how it works. Im working on a basic CRUD web app in PHP and it's been super interesting. I'm used to building things procedurally so its been a bit of a learning curve haha.
 
You can create a lot of things... Here's what we've done in the last 2 years
  • Private messaging
  • User profiles
  • Login / account dashboards
  • Forum software
  • Blog software
  • e-Commerce websites
  • Buying/selling tools
  • Server analytics
  • Web crawlers
  • Content scrapers / API features
  • Short URL generators
  • Polls / questionnaires / assessments
  • Web bots
There are so many things you can create. Of course, having a database like MySQL empowers all of this, and having good knowledge of JavaScript & web design can be a significant help. PHP is a great entry level language that can be used to power so many systems.

With JS (Node.js is a huge plus), you can add to that list above with these...
  • Live messaging / chat rooms
  • Multiplayer browser games
  • Incredibly modern designs
  • Better resource management with less page loads
 
You can create a lot of things... Here's what we've done in the last 2 years
  • Private messaging
  • User profiles
  • Login / account dashboards
  • Forum software
  • Blog software
  • e-Commerce websites
  • Buying/selling tools
  • Server analytics
  • Web crawlers
  • Content scrapers / API features
  • Short URL generators
  • Polls / questionnaires / assessments
  • Web bots
There are so many things you can create. Of course, having a database like MySQL empowers all of this, and having good knowledge of JavaScript & web design can be a significant help. PHP is a great entry level language that can be used to power so many systems.

With JS (Node.js is a huge plus), you can add to that list above with these...
  • Live messaging / chat rooms
  • Multiplayer browser games
  • Incredibly modern designs
  • Better resource management with less page loads
Wow that's amazing! Thanks for sharing this.

Generally how long did it take you to code some of these?
 
Wow that's amazing! Thanks for sharing this.

Generally how long did it take you to code some of these?
It can vary in time, so it depends. Scripts for things like crawlers or specific features can take hours, but larger features can take days or even weeks. It really depends on what is being done, and at what scale. It's easier to make an admin portal for a single user to manage some information than it is to create a portal for administrators, moderators, and regular users - but we have clients that use both. We basically just build elaborate business portals with tools, digital products, information, and basic company social networks.

No problem, happy to share :)
 
It can vary in time, so it depends. Scripts for things like crawlers or specific features can take hours, but larger features can take days or even weeks. It really depends on what is being done, and at what scale. It's easier to make an admin portal for a single user to manage some information than it is to create a portal for administrators, moderators, and regular users - but we have clients that use both. We basically just build elaborate business portals with tools, digital products, information, and basic company social networks.

No problem, happy to share :)
Very interesting! If I may ask what was the most challenging and most time consuming job you had to do? Was there any points where you had to go to google for help?
 
Very interesting! If I may ask what was the most challenging and most time consuming job you had to do? Was there any points where you had to go to google for help?
Many of our clients have projects that are ongoing for 1-2 years, with new features & products being pushed throughout the year. So there's always time consuming code to write. I learned how to code PHP years ago by using Google, so yea - in the beginning I was using Google, StackOverflow & YouTube almost every day until I could just write code without needing to look things up
 
Oh wow! Very cool! I’m so keen on getting more fluent in coding and start creating things. Do you periodically find yourself looking things up?
 
Oh wow! Very cool! I’m so keen on getting more fluent in coding and start creating things. Do you periodically find yourself looking things up?
Yeah, of course
I usually look up things on Google if I'm using a new library or API... I also try to learn new languages & libraries relatively frequently, so research and testing is always part of my learning.

Most of the time though there are good docs for libraries, APIs and web software. So I can just read the information on the developer's website and learn how to do it... PayPal documentation is pretty annoying, but if you read through it you can use their API.. as an example.
 
As both @Ghost and @TopSilver have pointed out, PHP can essentially be used for a lot of things on the Web. The Language is a Server-Side Programming-Language so that means it does everything related to Databases, Servers, collecting Data from Forms, you get the idea.

Here are some major uses of PHP:
  • Internet Forums
  • Collecting User-Data from Forms and sending it to a Database
  • Social-Media(Facebook uses PHP)
  • Search-Engines(All major Search-Engines such as Google and Yahoo! use PHP. But, Bing does not).
  • Web-Software(So, Content-Management-Systems[CMS], Wiki-Software[MediaWiki], Forum-Software[SimpleMachinesForum/SMF] and Blogging-Software[Wordpress])
Those are some of the major uses of PHP. In fact, those uses are really all it's used for. @Ghost has pointed out some other uses for it such as Web-Bots and Web-Scrapers but in my opinion, a Language like Python would be best for Web-Bots and Perl would probably be best for Web-Scraping(From what I've read so far, Perl is good for Web-Scraping).

Along with major uses for PHP, there are some smaller uses for it but I can't really think of any smaller uses for it.

There are some things PHP isn't really best for. Online-Banking is a good example. PHP is known to have a lot of Issues with Security as much as Java is, but if I'm correct, Java is just a bit more secure than PHP. A lot of Banks do actually use Java but even then, Java is known for it's Security-Issues, along with PHP and the now dead, Adobe/Macromedia Flash. So, if you're planning on trying to make a secure Website then maybe look for a more secure Language or try and write good PHP code that can make the Site more secure. As for looking for a more secure Language, a good one to maybe use is Python. Python does seem to be quite popular for Websites nowadays, as much as Perl and PHP were popular for Websites back in the 90's and early 2000's(Fun fact: Craigslist still runs on Perl).

Overall, the uses of PHP depends on what you want to use it for and what you actually want to do in Computer-Science and Programming in general. If you want to make Software, then C, C++ or Java would be your best bet. AI and Machine-Learning, Python. Web-Development, would of course be your HTML, CSS, JS and PHP + *SQL.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom