• 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

    • Movavi Video Editor Plus 26.17.0 by Razvan Serea With Movavi Video Editor Plus, you can either enhance your video files with two or three simple steps, or turn them into something completely new. Create your own movies using multiple filters, transitions, and special effects: show multiple videos on one screen with the Picture in picture effect or change the background with the Chroma Key effect, imitate the camera zoom or make your video look like an old-style movie. Adjust video parameters such as brightness, contrast and colors. Stabilize shaky footage, improve video quality and remove defects. Create video presentations, tutorials or educational videos: add titles and record your own narration to create a video with voiceover. Import video from any source: TV-tuner, webcam, camcorder, or VHS. Drop multiple media files onto a timeline and let your imagination do the rest! Features at a glance: Video and audio editing on a timeline Edit, enhance videos Add background music Apply titles and effects Image quality improvement Hollywood-worthy effects High-grade titles and fades Digitize VHS tapes, record video from TV tuners Stabilize any shaky sections Support for a wide range of formats Prepare your videos for uploading to YouTube, Facebook, Vimeo, or any other website New in Movavi Video Editor 2026: 30+ fresh subtitle styles. Upgrade your automatic captions with new designs. Customize your text in the Styles tab with a single click. Optional advanced settings are also available in the dedicated Design tab. Subtitles in English – instantly! Translate auto-subtitles into English with a click – no dictionaries or online services needed. Once translated, configure and fine-tune the subtitles using the standard editing tools. 40+ adjustable effects. Enhance your videos in a click with new realistic effects – from dust particles and light leaks to retro-style and VHS. Every effect is fully customizable – so it will fit any clip perfectly and bring an extra spark to your edits. Ultra-fast playback. Show more in less time with video speed control of up to 100x. Perfect for epic time-lapses, long process recaps, or whenever you want to add some extra energy to your content. Magnetic zones are marked with dots, and the 1x value is indicated by a vertical line. Silence removal – in a click. Cut out unwanted pauses automatically or fine-tune the pause length and volume threshold yourself. Skip the tedious cleanup and make your videos more dynamic. Fast effect copying. Effortlessly duplicate any effect from one video to another: click Clip effects in the dropdown menu and proceed to copy or paste. Movavi Video Editor Plus 26.17.0 changes: A new set of subtitle styles Check out the latest drop of ready-made subtitle styles with active word highlighting – fully designed and ready to use. Each one has its own vibe, so you can quickly find the perfect match for your video. Give them a spin and pick your favorite. Download: Movavi Video Editor Plus 26.17.0 | 2.7 MB (Shareware) View: Movavi Video Editor Plus Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • "New" Outlook has themes and colours and all sorts of visual customizations not just black and white.
    • What a bizarre statement. Why are you against users having choices? Are you against all extensions or just ad blocking? What about extensions to alter the W11 start menu to suit user preferences. Are you against those?
    • Honestly, I've been using the Lite version for a couple of months now, and it's been working well for me in my daily life. So much that I don't even miss the original version.
    • I use classic for reliability. Dark grey is vastly better than the all black or all white of new outlook.
  • Recent Achievements

    • Week One Done
      skylerssviv earned a badge
      Week One Done
    • One Month Later
      mobmobiles earned a badge
      One Month Later
    • Very Popular
      Captain_Eric earned a badge
      Very Popular
    • One Month Later
      amusc earned a badge
      One Month Later
    • One Month Later
      DJC50PLUS earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      501
    2. 2
      PsYcHoKiLLa
      229
    3. 3
      +Edouard
      98
    4. 4
      ATLien_0
      91
    5. 5
      Steven P.
      82
  • Tell a friend

    Love Neowin? Tell a friend!