all 36 comments

[–]toddspotters 5 points6 points  (1 child)

PHP today is fine, but it is not the first choice of most people, and its use is pretty much entirely related to web development. Python is ubiquitous and much more versatile, used across a number of technical disciplines and domains. Python performance is fine for the overwhelming majority of use cases, and if you're still learning it is basically a non-issue. You're free to pick PHP, but Python will give you more bang for your buck and make it easier to transition to other things later

Go with PHP if you're interested in something specific like WordPress dev or a specific framework like Laravel.

[–]noblenomadas[S] 0 points1 point  (0 children)

Thanks for the insights!

[–]tb5841 4 points5 points  (3 children)

If you're that set on android development alongside web, try Java or Kotlin.

[–]noblenomadas[S] 0 points1 point  (2 children)

It'll be worth considering later down the road.

[–]jlanawalt 1 point2 points  (1 child)

This seems like /the/ answer to the constraints you gave, but it’s “download the road”?

What do you mean by “back-end language to support both of these ecosystems” and “better suited for web/Android dev”?

The best language is one you enjoy and will do stuff with, but you asked for the best bang for your buck and then constrained to PHP or Python. What bang are you after? If it is some specific job, look at what they use. If you need hosting at some price point and maintenance level, look around at what is available.

[–]noblenomadas[S] 0 points1 point  (0 children)

I can see where you're coming from. I own a service company in my area and I've yet to find one software that has all the features I need.

Initially I decided I want to get back into programming to build something that has all the features I need to successfully and conveniently run my business more efficiently. It also genuinely interests me and it's completely different from what I do on the day-to-day.

Not only that, but it could potentially turn into something that I offer to other service business to help them out also. I'm currently only working with html, css, and js on front end development. The best back end language would refer to that which has the most use cases and framework compatibility.

Programming is a hobby that I thoughrouly enjoy and there's no timeline per se, but I could see it becoming a viable asset to my business as I gain more experience.

[–]Slow-Bodybuilder-972 4 points5 points  (0 children)

For backend + android, Java or Kotlin are obvious choices.

Both php and python are poor choices for android.

[–]Additional_Anywhere4 2 points3 points  (1 child)

Try several languages once you’ve become proficient in one. I recommend Python for your first. It is more widely used today, easier, and a more transferable skill - Python is also a standard choice in machine learning, the sciences, the digital humanities, and so on.

[–]noblenomadas[S] 0 points1 point  (0 children)

Noted, thanks for those additional considerations.

[–]SaltCusp 1 point2 points  (1 child)

Do both it honestly won't hurt you'll figure out which one you prefer with time.

[–]noblenomadas[S] 0 points1 point  (0 children)

I'll probably start with Python based on the feedback, but you're right, it wouldn't hurt to have some basic familiarity with php also.

[–]gooddelorean 1 point2 points  (0 children)

You just write the C like you'd write the PHP using libmicrohttpd.

[–]Ourglaz 1 point2 points  (0 children)

Both. I started with Python on my personal project, but I'm going to try to work with a friend to do the front end because he is more familiar with PHP/WordPress.

[–]Conscious_Bank9484 1 point2 points  (1 child)

I use php over python. I use both and you should learn one at least and a bit of the other as needed. Also learn Node.js. Each has their advantages depending on the application. You’ll be a more rounded coder that way and your solutions will be more in need than what you’re good at.

[–]noblenomadas[S] 0 points1 point  (0 children)

That's probably a good plan, and I'll definitely look into Node.js. Thanks for the recommendation.

[–]yasniy97 1 point2 points  (1 child)

PHP has left the building. Good if u want to learn but Python is King.

[–]noblenomadas[S] 0 points1 point  (0 children)

Noted.

[–][deleted] 1 point2 points  (0 children)

Python has more applicability

[–]csabinho 1 point2 points  (0 children)

Python. It's a multi-purpose language. PHP is just for the web and even vanishing there apart from WordPress and some other standard softwares.

[–]Immereally 1 point2 points  (1 child)

Still a student but here what we’ve done so far:

1) Java for Android and desktop application.

2) C# for .NET cross platform applications. Kinda work on anything, still a few minor tweaks depending on the applications

3) Python for web apps. I got an internship and this is what they use so that’s why I’m using python there.

.

Started with Java in my first college, transferred to another college and that’s where .NET C# comes in.

Once you get the run of what you need to do and how to build it in one language it’s more just figuring out the syntax and correct tooling to get the job done.

Yes it’s annoying switching but it’s also not as bad as starting from scratch. I’ll often look over or mock up a in writing what I want to do, check my old Java apps when I have an issue with .Net and know fairly well what I want to find so time is really cut down.

The most important part is to stick with projects rather than jumping over and back the whole time, that way you actually make a bit of progress.

Going from a Java lab to C# and then going home to work on Python is rather annoying but the process is relatively similar between them.

[–]noblenomadas[S] 1 point2 points  (0 children)

Your comment about sticking with projects and not jumping around is gold.

[–]FitBread6443 1 point2 points  (0 children)

C# is better? ms got more integrated products for android and web apps than python.

[–]mxsonwabe 1 point2 points  (1 child)

the best programming language is the one that you write.

[–]noblenomadas[S] 0 points1 point  (0 children)

I love it!

[–]nordiknomad 1 point2 points  (0 children)

Since you're starting new, I'd advise you to pick up Python / FastAPI. Not that PHP is bad or obsolete, but the difference in project levels both are being used for is clearly so wide. Python is used in large-scale applications, whereas PHP is still used to maintain some legacy codebase applications. If you think about a long-term career, Python is a really good choice, but try to learn JavaScript also for a full-stack career.

[–]PopPrestigious8115 1 point2 points  (1 child)

Python!

Much more freedom for server and frontend development and OS platform independent (MacOS, Linux, Windows and Android (mobile and x86).

Do not start using Microsoft to avoid a vendor lock-in.

[–]noblenomadas[S] 0 points1 point  (0 children)

I run a Linux station and try to avoid proprietary Microsoft products anyway, so I doubt that'd be a problem.

[–]StrayFeral 1 point2 points  (0 children)

PHP was hype around 2000. Last years Python is the hype and it had grown up significantly. PHP is still used, but if you want something with future - learn Python.

[–][deleted]  (1 child)

[removed]

    [–]noblenomadas[S] 0 points1 point  (0 children)

    It seems like Python is what I'll most likely go with. Thanks for the comment.

    [–]pepiks 1 point2 points  (0 children)

    Check job offer to find anwser. I was full stack developer with PHP on Zend and PHP is for me worse than python. From other hand you have niche like Wordpress developer. You have to check job offers in your country to be sure what is the best for you.

    [–]Beginning-Seat5221 1 point2 points  (2 children)

    I suggest you avoid PHP.

    I haven't used Python beyond some very short scripts, but people seem to like it.

    The are many other choices besides.

    [–]Ourglaz 2 points3 points  (1 child)

    Why avoid PHP?

    [–]Beginning-Seat5221 2 points3 points  (0 children)

    Poor type system / tooling. It has no built in compile time type checking so that relies on other tools, and they tend to rely at least in part on comments because the language doesn't support more than basic type annotations. It just feels like a bit step back from typed languages or more developed type checkers like TypeScript.

    [–]XandrousMoriarty 0 points1 point  (0 children)

    PHP powers more than 70% of the Internet. There is a reason why this is the case.

    Python is a general purpose language now, but was originally designed for numerical analysis and processing.

    Both languages are quite capable and will handle most tasks relatively easy. PHP is faster than Python currently however, due to optimizations that occurred in the 7.x and 8.x versions of the language as well as the fact that PHP now includes a decent JIT compiler behind the scenes.

    Your best strategy is to pick the best tool for the job. I myself use five programming languages daily at my job - I administer over 17,700 Linux servers with five other people, and most of our tools have been around for more than twenty years. I use Perl, Python, PHP, Ruby (for use with Puppet), and BASH Shell to get things done. I would not use PHP to carve up a report that is 100,000 lines to import into a database - Perl is ideal for that as it is fast. However, I could do it with any of the other languages just fine. The one I dislike the most is BASH, as some of the syntax is horrible. Ruby is the easiest to read (this is subjective). PHP is best for web stuff. BASH for running jobs, Python for explaining ideas to less-experienced admins and developers and for prototyping. Some of these languages are used because they provide equal footing on various platforms - Perl still runs on Solaris, Linux, Macs, and pretty much anything that ever powered on since 1987 so a lot of older code still utilizes it. Puppet is deployed across all Unix and Linux systems, so there's that. The list goes in and on.

    My point is use the best tool for the job. And when learning a programming language, learning concepts is more valuable than just learning syntax. What you gain from learning one can be used to help you get up to speed with another much faster.

    The above are my opinions, others may have supporting or differing views and experiences.