• 0

php or python for web development?


Question

I am trying to get into web development and I have been researching the different languages that I can use to start learning these things. I have a little bit of php knowledge, enough to allow me to make customization and changes to some things in wordpress but not enough to really do anything with it.

With so many different languages that can be used to code websites I am confused what would be the best one to chose to start learning. I have read good things about django (python) and how it is a better language that is more cleaner for bigger scale projects and that such. php is more widely used/supported and basically ready to go out of the box, however it has its own set of problems also. The more I read about the two different languages, the more I get indecisive.

Can you help sway me in the right direction?

Link to comment
https://www.neowin.net/forum/topic/1115375-php-or-python-for-web-development/
Share on other sites

Recommended Posts

  • 0

I don't really think there is a 'best' option, you can write clean well-structured large scale web applications in pretty much any language as long as you follow good coding practices.

Personally I use Ruby/RoR or ASP.NET MVC (not web forms) for any new projects. I used PHP for 6-7 years before that and contributed to the interpreter... but I'm much happier with Ruby & C#, there's a ton of bad design/annoyances/inconsistencies in PHP. There are some good upcoming PHP frameworks such as FuelPHP and Laravel although obviously they can't fix the underlying annoyances with the PHP language.

I would recommend just spending a while with each language/framework learning the basics / experimenting until you find the one(s) you like best.

  • Like 2
  • 0

I would personally recommend PHP as I'm currently using Laravel for a few projects (a few customer sites and some of my own projects.). But PHP was the first web development language that I learned ... so I'm always following PHP more so than lets say Ruby or Python.

  • 0

Ehh, it's good to know both, and starting with something like Python might let you avoid pitfalls you'd hit if you start with PHP (Which seems to welcome bad practises through it's bad design :shifty: )

That said, Python and PHP run quite differently (PHP normally runs in-process with the server, Python runs outside), while you can setup PHP to behave like Python it's a fair bit harder.

  • 0

Ehh, it's good to know both, and starting with something like Python might let you avoid pitfalls you'd hit if you start with PHP (Which seems to welcome bad practises through it's bad design :shifty: )

That said, Python and PHP run quite differently (PHP normally runs in-process with the server, Python runs outside), while you can setup PHP to behave like Python it's a fair bit harder.

PHP only runs in process with the server IF you are using Apache/Mod_PHP,,, otherwise you use PHP-FPM and it really isn't "a fair bit harder" to install or configure...

  • 0

Python.. django is just the easiest way to get going and even though there is a lot of php code out there, that doesn't mean its the best place to start. django is just so robust and easy to build robust applications with that i simply couldn't recommend php unless you specifically need to run an existing php code base.

  • 0

There's probably 10 times the PHP projects out there compared to Python projects, which is worth taking into consideration. Building something from the ground up, either works.

There are 10 times more PHP projects, but there are fewer Django (Python) developers. I get recruiters begging me for leads on Django developers pretty often because they are harder to find.

  • 0

What do you actually want ?

Do you want to have fun as an amateur ? Do you want to have a job one day as a web dev. Do you have a degree in computer science ?

If you are doing it to become a "pro" then you should start from scratch. Too many "web devs" these days don't master programming and are only good at using a framework. It's great cause it's easier for real programmers to find a job but anyway that's another subject ... Learn C and then get a proper oop book (one about the paradigm and not the languages). If you are already there then i suggest to learn how the web works before learning a language. If you know C and Java/C++/C# you'll have no problem getting into any languages out there. But CSS can be tricky. HTML too once you get into proper use of tags and things like WAI-ARIA. Javascript itself is easy but you need to know the DOM. I recommend learning Jquery too. After you kow how it all works you can start to learn a framework.

There's too much s***** web form dev out there knowing nothing about how the web works. It's daunting to see how much of these guys have a job when you get into a new org to help. Some of those guys can't even do a simple task in Javascript and CSS. And they can call themselves web devs go figure ...

If you do it purely for fun then try all languages and chose the one you prefer. Despite what a lot of people here will tell you there's no perfect language. They all have + and -. Ruby on rail is a good choice even if it's not used a lot. ASP.NET MVC is another good one. Php/Zend/... and even perl can be fun too from a programmer perspective. Stay away, very far away, from web form. Please do myself this favor. Personally when i want to have some fun i stay away from any framework and return to what dev used to be before people forget how to properly code because of frameworks (or maybe frameworks was created because too much people did not know how to code ;)).

  • 0

There are 10 times more PHP projects, but there are fewer Django (Python) developers. I get recruiters begging me for leads on Django developers pretty often because they are harder to find.

True. If I had to pick one to start out, with no need to do either, I'd go with Python. It's a better language, it's more useful in general, and I think it's going to grow from here out.

That said, if I wanted to pick up an existing system, or develop something for other people to use today, PHP.

  • 0

At the end of the day, php and python are both... ****. Python 2.x to 3.x broke almost everything for what reason? ABSOLUTELY NO REASON AT ALL!

PHP 5.4 removes safe mode completely and breaks PHP-GTK support and suhosain patch... WHY!? ABSOLUTELY NO REASON AT ALL!

Whichever you pick is equally as **** as the one you didn't pick, so it doesn't really matter.

  • 0

PHP can run very easily on all the major web server products out there, great documentation to learn with and follows a C++ like syntax. Due to the similarities/blatant copying of Perl functions, it's very fast to produce something quickly.

  • 0

Almost every web site uses HTML and Javascript, client-side. That's where I'd start. After that, server-side, there are many choices: Javascript is one again (Node.js), C# (ASP.NET), Ruby (RoR), Python (Django), PHP... Although I haven't learned it personally, PHP looks like one frighteningly bad language, so if you can avoid it, by all means, avoid it.

  • 0

PHP only runs in process with the server IF you are using Apache/Mod_PHP,,, otherwise you use PHP-FPM and it really isn't "a fair bit harder" to install or configure...

Yeah, I'm not entirely sure why I said it was hard, I actually have nginx+PHP-FPM setup on this very computer. And I'd say Apache+mod_php is a fairly common setup, every single web host I've ever used has done it that way.

  • 0

It's a bit of a tough call. Python is a good language, and infinitely better than PHP (faster too), but PHP is more common, so if you're looking for employability from your skillset, you're more likely to find work in PHP systems than Python systems (although both are pretty common).

Personally, I'd go the Python route. Be sure to check out ASP.NET (C#) and Ruby too, both nice languages and well supported for web development.

  • 0

I'd dispute python being faster than PHP. Hiphop is by far the fastest PHP compiler/server, much faster than python, and out of all the world's largest/most visted sites, you've got google running whatever they use, MS using php and ASP.net, facebook using PHP, twitter using... jsp? I've yet to see a large scale site use python.

  • 0

I'd dispute python being faster than PHP. Hiphop is by far the fastest PHP compiler/server, much faster than python, and out of all the world's largest/most visted sites, you've got google running whatever they use, MS using php and ASP.net, facebook using PHP, twitter using... jsp? I've yet to see a large scale site use python.

Last I checked Twitter uses Ruby on Rails for the UI and SCALA for the backend.

  • 0

my god so many people hate php .... I find it so useful :/

It's popular to hate on it. There's also a lot of terrible PHP information out there, which propagates bad code. I'm sure if you Google you can find a few thousand guides on how to create a username / password system in PHP that relies on storing information in plain text with out checking for SQL injections.

On the other hand, PHP's documentation is stellar, and it runs basically anywhere.

  • 0

Python Good:

Consistent, more respectable, better language overall and in practice. Teaches better ways to program almost purely by accident. usable outside of web development, decent documentation, excellent community. forced white spacing. Minimal 'boiler plating'. truly object oriented. Easy readability. "Google's language"

Python Bad:

Less documentation, less employable, can be argued that it's slower than PHP with some default configurations, my tests confirm this. Harder to implement on shared servers, even if its supported (which it isn't always). forced white spacing. Versions aren't backwards compatible from 3 to 2 (this can be a small or large issue)

PHP Good:

Huge documentation, easier to use for web development, widely supported, lives nicely side-by-side HTML, much more likely to get you a job, C style syntax is arguably more transferable. Can be very fast (hiphop). "Facebooks language (kind of)"

PHP Bad:

Huge documentation, reputation (which I think is not entirely PHP's fault), terribly inconsistent syntax and naming, many online tutorials teach you a bad way to do many things (which is where reputation gets ruined IMO), objects are a hack. Poor readability.

Overall: Although I'm almost primarily a Python developer, I usually use PHP for web development. It's fast, easy and gets the job done. It can be a little messy, and most 'code' that comes from it is hard to follow because it's all over the place. The choice is almost impossible for me, but I slightly recommend PHP. If you were to ever think about doing programming outside of web development I'd say to go with Python instead.

Hope this helps.

  • 0

I'd say PHP for quick developments and simple projects. If you're just generally looping through results from a database and doing very basic stuff I think it fits the bill. Read the article someone else mentioned about all the language inconsistencies though - the good thing is a quick google for what you are trying to achieve usually yields some results.

Although I've never used Python for web development, you will get the benefits of a cleaner more structured language, compiled code, proper object orientation and unit testing

  • 0

I'd dispute python being faster than PHP. Hiphop is by far the fastest PHP compiler/server, much faster than python, and out of all the world's largest/most visted sites, you've got google running whatever they use, MS using php and ASP.net, facebook using PHP, twitter using... jsp? I've yet to see a large scale site use python.

Perhaps my knowledge is out of date then. Last time I checked benchmarks, Python spanked PHP and ruby in speed tests, but checking the interwebs it seems that may no longer be true. Trouble with determining languages used for the web is that it's hard to tell who uses what. I'd assume that Google use a lot of Python though, since the benevolent dictator works there. I had heard that Youtube used it at one point too, although I don't know if it still does.

IIRC, Twitter used to use JSP, but they've moved to Ruby now. I'm keen to start learning RoR, I love Ruby as a language, and it seems to be gaining some serious momentum in web development.

  • 0

Read the article someone else mentioned about all the language inconsistencies though - the good thing is a quick google for what you are trying to achieve usually yields some results.

A good part of this article has be debunked. I'm too lazy to post link but do a simple google search. Anyone who write such a long blog post to critize a language clearly has an agenda. You know i hate web forms with a passion. I don't waste my time writing a 20 pages blog about it. I just don't use it when i can avoid it.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Dragon's Dogma 2: Dark Arisen expansion to bring snowy region, new updates also coming by Pulasthi Ariyasinghe Capcom had a surprise waiting for Dragon's Dogma fans today in the Nintendo Direct presentation. The company revealed an expansion for the second installment with a name that should be familiar to series veterans. Coming later this year, Dragon's Dogma 2: Dark Arisen is promising a massive new region to explore, new monsters, fresh skills to learn, and more. The studio says players will be heading to the Northern region of the world, named Norgan, to find new secrets about an undying "Fallen Dragon." There will be forgotten relics that the protagonist can find to unlock fresh weapons and skills the expansion is introducing. Players will also be able to find mysterious equipment from a previous Arisen as a part of the expansion, all part of 12 Lost Rites Dungeon Challenges they must complete to gain access. In Neowin's own review, I found Dragon's Dogma 2 to be an impressive RPG when it launched back in 2024, giving the title an 8.5/10 for its class variants, companion system, and immersive exploration. "Once a prosperous region of the kingdom of Vermund, it was abandoned many years ago for reasons unknown," says Capcom about the new region. "Long has it been since any soul traveled its paths. Blanketed in heavy snow, these frigid lands are home to savage hordes and creatures of unbelievable power. Those who are capable of vanquishing such fearsome foes, or those who possess a keen eye for exploration, will find themselves rewarded with powerful relics." Dragon’s Dogma 2: Dark Arisen expansion launches on October 9, 2026, with a $29.99 price tag. Ahead of the expansion release, Capcom is also planning to release two free updates to the base game. The first will land tomorrow, June 10, bringing more accessible fast travel with an Eternal Ferrystone and other quality-of-life adjustments. The second update will land sometime in August, aiming to improve frame rates, add more save slots, and bring even more community-requested adjustments. This expanded Dark Arisen edition is also launching on the Nintendo Switch 2 on the same day the content comes to PC, Xbox Series X|S, and PlayStation 5.
    • Classic themes are just the colors on the bar like the olden days, if you use the image themes, it does fancy transparent backgrounds and it makes the elements of the app look like they are transparent bubbles. This sample image shows what it looks like.  
    • Good point, unfortunately. NextDNS has far more filters and workarounds than uBlock, and it's easy to implement.
    • Windows 10 KB5094127 Patch Tuesday improves File Explorer search and more by Taras Buria The June 2026 Patch Tuesday updates are here, bringing mandatory patches to users with PCs enrolled in the Extended Security Update program for Windows 10. Microsoft is rolling out KB5094127, with build numbers 19045.7417 and 19044.7417. Changelog includes the following: [File Explorer] This update improves File Explorer search, including support for Chinese text, and UTF 8–encoded files without a byte order mark (BOM). Text now displays more clearly and consistently across search results, Content view, and tooltips. [Secure Boot] This update enables dynamic status reporting for Secure Boot states in Windows Security App. This update adds a new policy setting, LimitSecureBootRequiredServiceData, under Computer Configuration > Administrative Templates > Windows Components > Secure Boot. When this setting is enabled, Windows limits the Secure Boot service data it sends by suppressing the event normally sent to Microsoft. This policy is also included in the Windows Restricted Traffic Limited Functionality Baseline package. For information about the policy, see Manage connections from Windows 10 and Windows 11 operating system components to Microsoft services. With this update, Windows quality updates include additional high confidence device targeting data, increasing coverage of devices eligible to automatically receive new Secure Boot certificates. Devices receive the new certificates only after demonstrating sufficient successful update signals, maintaining a controlled and phased rollout. As for known bugs, Microsoft has the following to say: A workaround is available in the official documentation. Today's updates are available for PCs enrolled in the Extended Security Updates program only. If your PC is eligible, you can download the update from Settings > Windows Update or from the Microsoft Update Catalog here.
    • Then the solution is to not let children have easy access to smart phones or internet until they are older, not mass surveillance. Only this would require parents to do actual parenting, most likely, as with any good solution to the problem.
  • Recent Achievements

    • Week One Done
      rubentuben8 earned a badge
      Week One Done
    • Week One Done
      ARaclen earned a badge
      Week One Done
    • One Year In
      jojodbn earned a badge
      One Year In
    • One Month Later
      jojodbn earned a badge
      One Month Later
    • Week One Done
      jojodbn earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      523
    2. 2
      PsYcHoKiLLa
      231
    3. 3
      +Edouard
      124
    4. 4
      ATLien_0
      87
    5. 5
      Steven P.
      83
  • Tell a friend

    Love Neowin? Tell a friend!