Need advice about which tool to choose?Ask the StackShare community!

PHP

143.6K
79.2K
+ 1
4.6K
Rust

5.7K
4.7K
+ 1
1.2K
Add tool

PHP vs Rust: What are the differences?

Key Differences between PHP and Rust

PHP and Rust are two programming languages with distinct features and use cases. Here are the key differences between PHP and Rust:

  1. Performance: One significant difference between PHP and Rust is their performance. PHP is an interpreted language, while Rust is a compiled language. This means that Rust compiles into machine code, resulting in faster execution times. On the other hand, PHP relies on a runtime interpreter, making it slower compared to Rust.

  2. Memory Management: Another key difference is how PHP and Rust handle memory management. PHP uses automatic memory management through garbage collection. It automatically frees up memory when objects are no longer needed. On the contrary, Rust employs a borrow checker and ownership system, ensuring memory safety without the need for a garbage collector. This allows developers to have more control over memory management in Rust.

  3. Type System: PHP and Rust also differ in their type systems. PHP is a dynamically typed language, where variables do not have static types, and types may change during runtime. In contrast, Rust is a statically typed language, where variables must have a defined type at compile-time and cannot be changed later. This helps avoid type-related errors and provides better code reliability in Rust.

  4. Concurrency: PHP and Rust handle concurrency differently. PHP relies on a single-threaded model, which means it can struggle with concurrent tasks. On the other hand, Rust has built-in support for concurrent programming through its ownership model and features like threads, channels, and async/await. This makes Rust more suitable for building scalable and concurrent applications.

  5. Ecosystem and Libraries: PHP has a vast ecosystem and a wide range of libraries available. It has been around for a long time and is widely used in web development, making it easy to find resources and solutions. Rust, being a relatively newer language, has a smaller ecosystem but is continuously growing. It excels in systems programming and is gaining popularity for its safety guarantees and performance.

  6. Error Handling: Error handling in PHP and Rust is handled differently. PHP follows a traditional exception-based error handling approach familiar to many developers. It utilizes try-catch blocks to handle exceptions and errors. On the other hand, Rust adopts an error handling mechanism called "Result" and "Option" types. The "Result" type is used for returning results that can be either a value or an error, promoting a more controlled and explicit approach to error handling.

In Summary, PHP and Rust differ in terms of performance, memory management, type system, concurrency support, ecosystem, and error handling mechanisms. Depending on the project requirements and goals, developers can choose between these languages to achieve the desired outcomes.

Advice on PHP and Rust
Needs advice
on
GolangGolangPerlPerl
and
RustRust

I intend to use a programming language which I'll use as AWS runtime and write a script that will comb through tons of files in a directory and its subdirectories and search for simple text regular expressions and process and write the matches in a file as output. I have heard that Perl is good for regex based search but I also want the performance to be good as it will have to go through tons of files for IO. In this post: https://filia-aleks.medium.com/aws-lambda-battle-2021-performance-comparison-for-all-languages-c1b441005fd1, I see that Rust works well as AWS Lambda runtime with very good performance. Which one should I choose as my AWS lambda runtime for this problem? Golang is also an option as it is fast as per the above link.

See more
Replies (1)
Recommends

I used to work in a Perl shop and must admit that the language is very simple for tasks like these, but as you mentioned it's not fast at execution time. I'm now a Go programmer professionally but I taught myself the language while in college purely out of interest and eventually found my way to the job, not the other way around. I've recently been learning a little rust because of how much that language comes up in conversations around Go. I find the concept of the borrow checker nice but I have to admit I feel lost like I am in most flavors of new fancy framework js. That's not to say Rust is really anything like js, but the learning appears the same to me as someone who's convinced they could learn just about any programming language if it was necessary (over time I've seen procedural, OOP, declarative and functional stuff but never programming logic outside of the prolog code I wrote in school).

Go isn't made for your specific task at hand but it's a very easy language to pick up and it has good directory traversal standard library code and good regex (even though with time perl's has been optimized to be faster and I think it's written in C++) but more than anything Go is "cloud native" programming in that an awful lot of new microservice tech stacks are centered around it, docker and kubernetes are written in it, and there's a thriving community whose focus is generally web-first and performance-oriented. This means for your use case there might already be a large cohort of gophers that have asked the stackoverflow questions for you

I personally would push you towards the NYT Profiler for Perl before I would towards Rest, but that's because I know you wouldn't waste any time being able to get to the task at hand and then make it go faster, and I expect all but a few rustaceans would be able to do so with the same speed.

Whatever you pick I wish you the very best of luck!

See more
Needs advice
on
ElixirElixir
and
RustRust

I've been working with Js/Ts as a backend developer and I would like to get some suggestions about what new language to learn right now. I've been thinking about Elixir or Rust, focusing on creating WebApis and Blockchain technology. I am passionate about the funcional way but I'm now confident about Elixir in Blockchain. Rust seems like have more jobs about it than Elixir in a little research. Someone could give me some advice? Thank you.

See more
Replies (2)
Cristian Carreno
Lead Backend Software Engineer at Suda Outdoors · | 8 upvotes · 51.3K views
Recommends
on
ElixirElixirGolangGolang

For web development I would suggest to take a look into Elixir. Elixir is extemely good for real time apps through websockets, apps with a need of high concurrency and / or apps where you need to process hundreds of thousands of states of differents users in parallel thanks to the actor model that comes with Erlang virtual machine. To solve these kind of problems in another stack could be really hard and painful (including your current stack).

It's true that Elixir is a niche stack ( It deserves way more popularity in my opinion), so, if your concern is to learn something that would keep you inside the trend and market, instead of Rust or Elixir I would suggest Go. Go it's another outstanding language, will a lot of virtues, small and easy to learn, with it for example, you could compile the same application to different operating systems just with a special compiler command (And the compiler is blazing fast). You can also start with a lot of good libraries that helps you to keep your code clean and under control and of course, it's performance is very good too.

Hope my suggestions could be helpful.

Best regards, and happy coding!

See more
Tyrone Wilson
Lead Developer at Black Swan Data · | 7 upvotes · 50.5K views
Recommends
on
GolangGolang

Golang is to my mind by far the greatest bang for your buck in terms of investing your time it has a low barrier to entry. Elixir is fun and all, but it is VERY VERY niche. You are very unlikely to find a job directly requiring Elixir. Rust is a good option depending on what you want to achieve but golang is a great general-purpose language that has a very approachable learning curve, great documentation and a lot of jobs available. There are some very high profile projects written in golang. Docker, Kubernetes, InfluxDB and Grafana just to name a few. I was at this same junction at the end of 2018 having spent a lot of time in JS/TS & Ruby. I had already learned Elixir and done a couple of projects in it and I switched to Golang as I didn't want to learn niche languages. I have never regretted my choice. Obviously, every tool has its place but golang is a winner if you want to learn something new :)

See more
Needs advice
on
JavaJava
and
PHPPHP

Hi, I am working as a web developer (PHP, Laravel, AngularJS, and MySQL) with more than 8 years of experience and looking for a tech stack that pays better. I have a little bit of knowledge of Core Java. For better opportunities, Should I learn Java, Spring Boot or Python. Or should I learn Drupal, WordPress or Magento? Any guidance would be really appreciated! Thanks.

See more
Replies (3)
Recommends
on
FlaskFlaskJinja2Jinja2PythonPython

Hard to answer it depend on market. Python + Flask + Jinja2 is better that SpringBoot. Java can be paid better now but I think that future is Python. I code very good in PHP, Java, Python - prefer Python for less code and more effects. PHP is little ugly and limited to web.

See more
Ahmad Zain
Recommends
on
gogoPHPPHPPythonPython
at

easy and used in the most trending tech streams

See more
Recommends

What do you think about Node JS with React? I feel like this stack is fairly paid more than PHP.

I am also a Laravel developer, in process of transitioning towards Node js.

If you wanna personally connect with me, hit me up at @izshreyansh on twitter.

See more
Needs advice
on
C langC lang
and
RustRust

When working on Python, I noticed that Python is only useful for data science. I am looking for a programming language that:

  • Is different in terms of paradigm(I used OO only in Python for data analysis, I want something that is a different paradigm to improve my coding skills)

  • Is excellent at systems engineering

  • Will enhance my Python projects and basically make Python better

  • Has an excellent future, will skyrocket in terms of demand

  • Is very performant, excellent performance

  • Has a steep learning curve(it's because I want a simple language and an advanced language in my stack)

I found these two languages to fit my needs, and I need help choosing. Which would be better for me considering my needs

See more
Replies (2)
Jayson Pamittan
Software Engineer - Level III at Arch Global Services · | 2 upvotes · 54.5K views
Recommends
on
RustRust

Rust is more useful compared to C on some cases like in web assembly. C is more tedious to code. Rust is modern and has a lot more of opportunities. If you are also investing for the future I recommend Rust over C.

See more
Recommends
on
RustRust

It must be Rust, It absorbs the advantages of other languages,safe, good performance and develop quickly, The community is also growing and active. I think there are some difficulties to learn Rust, but when you have mastered it, you will write good programs than C lang

See more
Mahmoud Gabr
Software engineer at AlgoDriven · | 8 upvotes · 107.8K views
Needs advice
on
GolangGolangNode.jsNode.js
and
PHPPHP

I'm working in a company as a software engineer, Mainly we are focusing on PHP as the product is being developed in PHP (native) also there are a few products in Node.js, I tried to introduce Laravel but there is no luck to work on it. Now I have started learning Go language, should I focus more on Go or continue only with PHP and NodeJS. BTW I know PHP and NodeJS very well.

See more
Replies (1)
Recommends

Be flexible, be agile in your personal and professional life. Don't be afraid to learn new things and step outside of your confort zone BUT with reason. Reason can be a career path or just money. Does Go belongs to your career path? Does Go belongs to your company's toolset? Do yo seek for new job oportunities? Some people follow a complete career path by using a single language i.e, PHP or java, but if you want to standout in the crowd this is not enough. You already know PHP. This is an oportunity to learn something new. In general, I would advise you to learn at least one language & library/framework per stack . This will help you to lead a team someday.

See more
Adit Patel
Needs advice
on
RustRust
and
SwiftSwift

Hey there, we are looking to develop our own layer 1 blockchain. We're splitting the responsibilities for origination, clearing, and settlement across three independent but cooperating node networks. We've gotten our Proof of Concept up using Ruby on Rails for the nodes, you can see it as the attached link. So far, so good. Now we are looking to convert it into a distributable and are trying to figure out which language is the best for this.

Essentially our needs from the language are: solid networking tools and speed, very fast execution of basic actions, some parallel execution, and able to compile the end product into an easy to distribute and use package for end users.

I was learning Rust, but I have a healthy amount of experience with Swift and right now, it's only me coding. I've only done iOS coding, but have built a fintech app from scratch that's now in the app store so I'm pretty familiar with the language and its benefits. Haven't experimented with Vapor or any of the application development tools, and I wanted to know if it is a crazy idea to develop a blockchain node in Swift instead.

See more
Replies (2)
Recommends
on
RustRust

Pick Rust. Rust can provide all what you need and has been a major language in blockchain/cryptocurrency industry. Swift is slower than Rust and does not have such support in the networking and domain field. Swift tooling is great only on macOS, therefore you are likely to have troubles on other platforms.

See more
Peter Suwara
Director at Realityworks · | 6 upvotes · 109.3K views
Recommends
on
C++C++GolangGolangSwiftSwift

You can use swift of course. It’s more of a question of being performant.

You really want to try some basic operations and find what’s most performant for you.

Rust is wonderful for cloud applications requiring heavy concurrency, it has compile time checking for such things.

Go and C++ could be more performant in your case. Swift is really quite an obtuse language, with a lot of features, some which may complicate your implementation.

Also, you want to consider the market of developers who could help build it. If you use Go or C++ there is a larger collection of people who know the languages than there is with swift.

See more
Needs advice
on
JavaJavaJavaScriptJavaScript
and
PHPPHP

Hi there. I'm looking to build an employee time tracker web app. This should also be optimized for mobile. I'm trying to figure out what the best stack is for this. I have knowledge of Java, JavaScript, some C#. I don't mind learning a new language for this purpose. Any help or advice would be really awesome! Thanks.

See more
Replies (6)
Stephen Gheysens
Lead Solutions Engineer at Inscribe · | 14 upvotes · 1.8M views
Recommends
on
JavaScriptJavaScript

Hi Otensia! I'd definitely recommend using the skills you've already got and building with JavaScript is a smart way to go these days. Most platform services have JavaScript/Node SDKs or NPM packages, many serverless platforms support Node in case you need to write any backend logic, and JavaScript is incredibly popular - meaning it will be easy to hire for, should you ever need to.

My advice would be "don't reinvent the wheel". If you already have a skill set that will work well to solve the problem at hand, and you don't need it for any other projects, don't spend the time jumping into a new language. If you're looking for an excuse to learn something new, it would be better to invest that time in learning a new platform/tool that compliments your knowledge of JavaScript. For this project, I might recommend using Netlify, Vercel, or Google Firebase to quickly and easily deploy your web app. If you need to add user authentication, there are great examples out there for Firebase Authentication, Auth0, or even Magic (a newcomer on the Auth scene, but very user friendly). All of these services work very well with a JavaScript-based application.

See more
Recommends
on
JavaScriptJavaScript

As you have knowledge of Javascript, I would go towards Vue/React in Frontend and Node (with suitable framework) with backend. From my point of view Java would be too bloated for suggested kind of an app. I myself use PHP as a backend a lot and React as frontend but moving thoughts towards full stack javascript world.

See more
pramod shirsath
Founder at Supra Software Solutions · | 4 upvotes · 215.8K views

We migrated from PHP to Angular/PHP to Angular/Node to React/Node/AWS Lambda. React/Node(Typescript)/Lambda seems to be good so far as we have developed few applications (large and small) using this stack so far. React/Node/Lambda is also good for mobile. If you are planning to use AWS, you can use the S3 bucket to store the frontend and Lambda or EC2 for backend APIs.

See more
Recommends
on
JavaScriptJavaScriptPHPPHP

php is the best for beginners, and one of the best for web development at all, all the host servers can handle it, a basic knowledge in java is not enough for build a web site, but a basic knowledge in php is enough. learn php basics and oop and mvc design pattern or any framework like Laravel (optional), and javascript for frontend (a framework like React or Angular is optional but good) and you will build any web site you want.

See more
pramod shirsath
Founder at Supra Software Solutions · | 2 upvotes · 215.8K views
Recommends

We migrated from PHP to Angular/PHP to Angular/Node to React/Node/AWS Lambda. React/Node(Typescript)/Lambda seems to be good so far as we have developed few applications (large and small) using this stack so far. React/Node/Lambda is also good for mobile. If you are planning to use AWS, you can use the S3 bucket to store the frontend and Lambda or EC2 for backend APIs.

See more
Brandon Miller
Recommends

For just a time tracker app? I'd recommend going with a cloud-based approach. A couple serverless functions in whatever language you choose, and the front end can be a static website hosted inside a storage service (blob for Azure, bucket for AWS, etc). This will ultimately probably save you a little time, and them a little money on hosting.

See more
Brayden W
Needs advice
on
GolangGolangPythonPython
and
RustRust

Hey, 👋

My name is Brayden. I’m currently a Frontend React Developer, striving to move into Fullstack so I can expand my knowledge.

For my main backend language, I am deciding between Python, Rust, and Go. I’ve tried each of them out for about an hour and currently, I like Python and Rust the most. However, I’m not sure if I’m missing out on something!

If anyone has advice on these technologies, I’d love to hear it!

Thanks.

See more
Replies (4)
Recommends
on
GolangGolangPythonPython

Rust is still in low demand. It's a great language but you'll have a hard time finding jobs. Go is the mix of both Rust and Python. Great language with modern features, fast, scalable, fun to write, and at the same time it has high demand (not as much as python).

Python on the other hand is a language that you can't go wrong with. Look around you and see what your job market prefers. If there isn't much difference to you personally, pick the one with more demand.

See more

All of these are solid options, however considering your expertise currently, I would probably suggest Node.JS considering your past experience with JS. However Python offers a similar development environment to JS in my opinion, and Go is a good sort of intermediate between Rust and Node.JS and Python. It's fast, but not as fast as Rust, and offers a development experience that combines C-styled languages (like Rust), and Python-y languages... So: Rust for the fastest, Node for familiarity, Python for ease of development, and Go for a good middle ground. I have used all in personal projects... If you use Go, I suggest a easy to use web server framework like Fiber.

See more
Akihito KIRISAKI
Recommends
on
PythonPythonRustRust

Rust is a challenging choice, but worth to be chosen. It has strong memory-safety and type-safety, this gives you no bother about those errors. However, static typing languages often slow our developing speed down in early stage. In that case, it's effective to write prototype in an easy language like Python, and rewrite it in a hard language. It's important not to be afraid to throw away first code you write.

See more
Donald Tran
Software Engineer at T-Mobile · | 3 upvotes · 374.3K views
Recommends
on
RustRust

The other answers are excellent, but I want to be a bit of a contrarian and say you should learn Rust. While the number of jobs for it are (relatively) low(er), it is certainly expanding and you'd be surprised at which companies do use Rust (Discord, for example, is starting to move away from Golang to Rust!).

But the main reason is that learning Rust itself will teach you a lot about systems design (/backend) because of its borrow checker. You can try out a lot of ideas and make a lot mistakes and the borrow checker will always be there guide you to a better solution (thereby teaching you in the process).

Also, I wouldn't underestimated how important managing memory (and memory safety) is. While Golang is great in some ways, it doesn't protect you from pushing memory leaks into production. And eventually you'll come upon a scenario where you'll have to make your Python code run faster and the optimizations you'd have to do won't look pretty (or be very Pythontic).

And Rust is freakin fast! If you have Rust, you wouldn't need any other language for the backend (or any other systems level code). Check this blog post: https://blog.discord.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f?gi=dd8bc5d669d. Discord found that even after spending months optimizing Golang code it still wasn't fast enough. But unoptimized, first-draft Rust code was (is) faster by an order of magnitude!

See more
Piusha Kalyana
Needs advice
on
GolangGolangPHPPHP
and
PythonPython

Hi

I want to build a tool to check asset availability (video, images, etc.) from third-party vendors. These vendors have APIs. However, this process should run daily basis and update the database with the status. This is a kind of separate process. I need to know what will be the good approach and technology for this?

See more
Replies (5)
Hannes Holst
at 365 Consulting Services Ltd. · | 7 upvotes · 342.6K views
Recommends
on
PythonPython

hi - I think this depends on how you want to provide the information to the user. If you want to build a Wordpress-plugin: PHP If you want to build your own website: Python+Django / PHP / JavaScript+Node.js As Desktop application?

See more
anas mattar
Technical Lead at DPO International · | 3 upvotes · 329.5K views
Recommends
on
PHPPHP

for what technologies you should use, this is depend on what technology do you prefer? your should think best structuing for your code because each API vendor has different to a nother one so it's better no merege code vendores together. your code must be using SOLID principle pattern and some design pattern such as Factory Pattern

See more
Recommends
on
GolangGolang

The major advantage of Go is that you can run queries in parallel. Fire off a Go thread for each vendor and each thread can check the availability of assets from a specific vendor and update the database. Go supports hundreds of threads with ease.

See more
anas mattar
Technical Lead at DPO International · | 1 upvotes · 325.6K views
Recommends
on
C#C#GolangGolangPHPPHP

your decision depend on what language do you know. if you know php you can use laravel framework

See more
Oluwafemi Lawrence
Recommends
on
GolangGolang

Hi, I would recommend Go because of strongly-typed nature which makes a developer more productive as it is less error prone compared to the other dynamic-typed language. Go also has cron-job library(powered by goroutines) that can help with your automated tasks.

See more
Needs advice
on
JavaJavaKotlinKotlin
and
RustRust

I was thinking about adding a new technology to my current stack (Ruby and JavaScript). But, I want a compiled language, mainly for speed and scalability reasons compared to interpreted languages. I have tried each one (Rust, Java, and Kotlin). I loved them, and I don't know which one can offer me more opportunities for the future (I'm in my first year of software engineering at university).

Which language should I choose?

See more
Replies (8)
Recommends
on
JavaJavaKotlinKotlin

I will highly recommend Kotlin. I have worked with all three intensely and so far the development speed and simplicity is the best with Kotlin. Kotlin supports coroutines out of the box. Now, it isn't something that can't be implemented in other languages but Kotlin makes it super easy to work with them. Kotlin has a bit of learning curve, so, by the time you can actually use it idiomatically chances are that you will get proficient in Java too. But once you get it, you get it, then there is no other language ;) Kotlin is backed by Google and Jetbrains team so you can expect latest programming features and good community support.

See more
Mayur Borse
Software Engineer at hyphenOs · | 4 upvotes · 302.8K views
Recommends
on
RustRust

I'd say Rust's knowledge will be more valuable in comparison. You can work in Blockchain development, compile to WASM (WebAssembly). There is a new JavaScript/TypeScript runtime named Deno (by the creator of Node.js) that has its backend in Rust.

See more
Reza Malek
at Meam Software Engineering Group · | 4 upvotes · 294.6K views
Recommends
on
KotlinKotlinRubyRubyRustRust

It depends on which level and use cases you prefer to work at. Close to the machine? Rust is great but if you need to find more job opportunities, then take C/C++. Java has many job positions but I suggest Kotlin over it. Think about it as a better Java, but fewer job positions. Do you want to do your own projects? So a productive language like Ruby is way better. Like to program front-end apps? Take JS. Find your passion.

See more
Recommends
on
RustRust

If you want a compiled language then go for Rust. It takes a certain mindset to get your head around its memory management system and the way it handles "borrowed" memory. However, it will generate blindingly fast code that you can cross-compile for other platforms. As a systems programming language I highly recommend it. Take time and learn it.

Java is only compiled to bytecode, not to machine code. So it executes in the Java Virtual Machine. DOn't think that its not fast, because the latest incarnation are very fast indeed. For most practical purposes, users of your code won't notice any difference. There are a heck of a lot of features in Java that you either have to import via crates in Rust, or write yoursef. So productivity-wise, Java may well beat Rust.

Kotlin is a Java-lookalike. It's a nice, and succinct version of Java and is totally interoperable. But its a bit niche, and for me it fails because my dev environment of choice (Spring Tool Suite) doesn't really play well with Kotlin. To use it you would be well advised to use iDeaj. I have used kotlin, and I like it, but not enough to ditch all my Java code.

Other contenders, depending on your platform of choice are Golang, C, C++, and C# (available as Mono on Linux systems).

I use Rust and Java and if you need a compiled language I recommend Rust.

See more
ALESSIO SALTARIN
Distinguished IT Architect at IBM · | 4 upvotes · 302.7K views
Recommends
on
GolangGolang

As you certainly know, there are languages that compile in meta-code for Virtual Machines (Java, C#, Kotlin) and languages that compile in Machine Language (Go, Rust). Apart specific domains (blockchain, IoT embedded software, AI, cloud) almost no-one uses languages that compile in machine language, for a series of reason, most of all security and portability. So, if you are going to learn for business go with Kotlin - Java is a bit ancien regime. If you seriously need to learn a language that compiles in ML - for example you will code for IoT - go with Go - or Rust - but keep in mind that Rust is much less used than Go. PS: Kotlin also compiles in ML, but I would choose a language designed for that, instead of one that compiles "also" in ML. PPS: Some Virtual Machines - ie: GraalVM - allow you to compile Java in ML. The world of IT is beautiful.

See more
Luiz H. Rapatão
Tech Lead at rapatao.com · | 3 upvotes · 295.6K views
Recommends
on
JavaJavaKotlinKotlin

I'd recommend you to take a look at Java and Kotlin, the first due to the number of companies that actively use it in your products. Kotlin is gaining adept since it is fully compatibly with the Java ecosystem but usually requires less code to do the same (ignoring other benefits of the language). Another benefits of the Kotlin is that it is in fact multiplatform, where you could use the same syntax to code for mobile, web and backend applications. The drawback of Kotlin, is the number of open jobs that exists currently compared to Java, but I pretty sure that it will change in the near future.

See more
Alexander Nozik
Senior researcher at MIPT · | 3 upvotes · 295.7K views
Recommends
on
KotlinKotlin

All those are nice languages, but Rust is harder to learn properly and has a smaller ecosystem. If you want to work in system programming (like hardware drivers) Rust is probably your choice. Otherwise, Java/Kotlin ecosystem is much larger and gives much more possibilities (maybe excluding low-level system programming).

When talking about Kotlin and Java, both are good. But Kotlin, again, gives much more opportunities. Kotlin-JS gives you browser applications, Kotlin-Native allows to compile to native application (and interop with them). Kotlin-WASM will be available shortly. Rust is better than Kotlin-Native for native development tight now, but not by far and it makes sense only if you are focusing only on native development.

See more
Radu Maerza
Software Engineer at Freelancer · | 3 upvotes · 295.8K views
Recommends
on
KotlinKotlin

I would go with Kotlin. It is pretty hyped currently.

You can use Kotlin for a lot of application types. To name some:

  • Kotlin Multiplatform with Gradle
  • Ktor (https://ktor.io)
  • Spring Boot
  • Kotlin JS (as you already know Javascript, you might like this one)

The code is also really concise, readable and modern. It also provides many features that you will find in many other programming languages.

See more
Decisions about PHP and Rust
Olivier B Deland
Web Developer, Consultant at ConseilsWeb · | 13 upvotes · 123.2K views

Coming from a C/C++ background, I picked up PHP 20 years ago. Today, the language is still in constant evolution while still having a stable base. It powers all of my backend project. It is fast to prototype and get started, and is supported almost everywhere.

Python and Node.js do not provide anything that PHP cannot already offer, so there is no point for me to switch to those language. Mature framework like Laravel provides real ease and speed of development to kick-start any new web project, be it a simple API or a robust ERP running on server-less architecture. There are libraries available for machine learning, crypto, web3 and pretty much anything you can think of.

See more
Jacob M
Brand Director at NCINTEV · | 15 upvotes · 108.5K views

I’m well aware of the hate that php receives and some of it is well warranted. But the ease of implementation for so many features that I find myself needed on a daily basis is head and shoulders above what I could achieve with JavaScript on my backend. I can do more without the need of frameworks but I still have many options if I want that. Especially with database handling I find many of the complainants about php to be pure rhetoric.

See more

We chose Rust for our web API because the Warp crate makes it easy to compose high-performance and asynchronous APIs. Rust allows us to achieve high development velocity because it provides zero-cost abstractions and enforces strict type and memory-safety checks with high quality and actionable error messages.

See more

#rust #elixir So am creating a messenger with voice call capabilities app which the user signs up using phone number and so at first i wanted to use Actix so i learned Rust so i thought to myself because well its first i felt its a bit immature to use actix web even though some companies are using Rust but we cant really say the full potential of Rust in a full scale app for example in Discord both Elixir and Rust are used meaning there is equal need for them but for Elixir so many companies use it from Whatsapp, Wechat, etc and this means something for Rust is not ready to go full scale we cant assume all this possibilities when it come Rust. So i decided to go the Erlang way after alot of Thinking so Do you think i made the right decision?Am 19 year programmer so i assume am not experienced as you so your answer or comment would really valuable to me

See more
Kirill Mikhailov

Go is a way faster than both Python and PHP, which is pretty understandable, but we were amazed at how good we adapted to use it. Go was a blessing for a team , since strict typing is making it very easy to develop and control everything inside team, so the quality was really good. We made huge leap forward in dev speed because of it.

See more

Context: Writing an open source CLI tool.

Go and Rust over Python: Simple distribution.

With Go and Rust, just build statically compiled binaries and hand them out.

With Python, have people install with "pip install --user" and not finding the binaries :(.

Go and Rust over Python: Startup and runtime performance

Go and Rust over Python: No need to worry about which Python interpreter version is installed on the users' machines.

Go over Rust: Simplicity; Rust's memory management comes at a development / maintenance cost.

Go over Rust: Easier cross compiles from macOS to Linux.

See more
Timm Stelzer
VP Of Engineering at Flexperto GmbH · | 18 upvotes · 601.1K views

We have a lot of experience in JavaScript, writing our services in NodeJS allows developers to transition to the back end without any friction, without having to learn a new language. There is also the option to write services in TypeScript, which adds an expressive type layer. The semi-shared ecosystem between front and back end is nice as well, though specifically NodeJS libraries sometimes suffer in quality, compared to other major languages.

As for why we didn't pick the other languages, most of it comes down to "personal preference" and historically grown code bases, but let's do some post-hoc deduction:

Go is a practical choice, reasonably easy to learn, but until we find performance issues with our NodeJS stack, there is simply no reason to switch. The benefits of using NodeJS so far outweigh those of picking Go. This might change in the future.

PHP is a language we're still using in big parts of our system, and are still sometimes writing new code in. Modern PHP has fixed some of its issues, and probably has the fastest development cycle time, but it suffers around modelling complex asynchronous tasks, and (on a personal note) lack of support for writing in a functional style.

We don't use Python, Elixir or Ruby, mostly because of personal preference and for historic reasons.

Rust, though I personally love and use it in my projects, would require us to specifically hire for that, as the learning curve is quite steep. Its web ecosystem is OK by now (see https://www.arewewebyet.org/), but in my opinion, it is still no where near that of the other web languages. In other words, we are not willing to pay the price for playing this innovation card.

Haskell, as with Rust, I personally adore, but is simply too esoteric for us. There are problem domains where it shines, ours is not one of them.

See more
Kyle Harrison
Web Application Developer at Fortinet · | 17 upvotes · 346.8K views

Node continues to be dominant force in the world of web apps, with it's signature async first non-blocking IO, and frankly mind bending speeds. PHP and Python are formable tools, I chose Node for the simplicity of Express as a good and performant server side API gateway platform, that works well with Angular.

See more
Octavian Irimia

Both PHP and Python are free but when it comes to web development PHP wins for sure. There is no doubt that Python is a powerful language but it is not optimal for web. PHP has issues... of course; but so does any other language.

Another reason I chose PHP is for community - it has one of the most resourceful communities from the internet and for a good reason: it evolved with the language itself.

The fact that OOP evolved so much in PHP makes me keep it for good :)

See more
Roman Glushko
Machine Learning, Software Engineering and Life · | 3 upvotes · 338.8K views

I chose Golang as a language to write Tango because it's super easy to get started with. I also considered Rust, but learning curve of it is much higher than in Golang. I felt like I would need to spend an endless amount of time to even get the hello world app working in Rust. While easy to learn, Golang still shows good performance, multithreading out of the box and fun to implement.

I also could choose PHP and create a phar-based tool, but I was not sure that it would be a good choice as I want to scale to be able to process Gbs of access log data

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of PHP
Pros of Rust
  • 950
    Large community
  • 817
    Open source
  • 765
    Easy deployment
  • 487
    Great frameworks
  • 387
    The best glue on the web
  • 235
    Continual improvements
  • 185
    Good old web
  • 145
    Web foundation
  • 135
    Community packages
  • 125
    Tool support
  • 35
    Used by wordpress
  • 34
    Excellent documentation
  • 29
    Used by Facebook
  • 23
    Because of Symfony
  • 21
    Dynamic Language
  • 17
    Cheap hosting
  • 16
    Easy to learn
  • 14
    Awesome Language and easy to implement
  • 14
    Very powerful web language
  • 14
    Fast development
  • 13
    Composer
  • 12
    Because of Laravel
  • 12
    Flexibility, syntax, extensibility
  • 9
    Easiest deployment
  • 8
    Readable Code
  • 8
    Fast
  • 7
    Most of the web uses it
  • 7
    Fastestest Time to Version 1.0 Deployments
  • 7
    Worst popularity quality ratio
  • 7
    Short development lead times
  • 6
    Faster then ever
  • 5
    Open source and large community
  • 5
    Simple, flexible yet Scalable
  • 4
    Open source and great framework
  • 4
    Large community, easy setup, easy deployment, framework
  • 4
    I have no choice :(
  • 4
    Has the best ecommerce(Magento,Prestashop,Opencart,etc)
  • 4
    Is like one zip of air
  • 4
    Easy to use and learn
  • 4
    Cheap to own
  • 4
    Easy to learn, a big community, lot of frameworks
  • 4
    Great developer experience
  • 2
    Used by STOMT
  • 2
    Hard not to use
  • 2
    Safe the planet
  • 2
    Fault tolerance
  • 2
    Walk away
  • 2
    Great flexibility. From fast prototyping to large apps
  • 2
    Interpreted at the run time
  • 2
    FFI
  • 1
    Secure
  • 1
    Bando
  • 1
    It can get you a lamborghini
  • 1
    Simplesaml
  • 0
    Secure
  • 143
    Guaranteed memory safety
  • 130
    Fast
  • 87
    Open source
  • 75
    Minimal runtime
  • 70
    Pattern matching
  • 63
    Type inference
  • 56
    Algebraic data types
  • 56
    Concurrent
  • 46
    Efficient C bindings
  • 43
    Practical
  • 37
    Best advances in languages in 20 years
  • 32
    Safe, fast, easy + friendly community
  • 30
    Fix for C/C++
  • 25
    Stablity
  • 24
    Zero-cost abstractions
  • 23
    Closures
  • 20
    Great community
  • 20
    Extensive compiler checks
  • 18
    No NULL type
  • 18
    Async/await
  • 15
    Completely cross platform: Windows, Linux, Android
  • 15
    No Garbage Collection
  • 14
    Great documentations
  • 14
    High-performance
  • 12
    Super fast
  • 12
    Generics
  • 12
    High performance
  • 11
    Safety no runtime crashes
  • 11
    Guaranteed thread data race safety
  • 11
    Fearless concurrency
  • 11
    Macros
  • 10
    Compiler can generate Webassembly
  • 10
    Helpful compiler
  • 9
    Easy Deployment
  • 9
    RLS provides great IDE support
  • 9
    Prevents data races
  • 8
    Real multithreading
  • 8
    Painless dependency management
  • 7
    Good package management
  • 5
    Support on Other Languages

Sign up to add or upvote prosMake informed product decisions

Cons of PHP
Cons of Rust
  • 22
    So easy to learn, good practices are hard to find
  • 16
    Inconsistent API
  • 8
    Fragmented community
  • 6
    Not secure
  • 3
    No routing system
  • 3
    Hard to debug
  • 2
    Old
  • 26
    Hard to learn
  • 23
    Ownership learning curve
  • 11
    Unfriendly, verbose syntax
  • 4
    Variable shadowing
  • 4
    High size of builded executable
  • 4
    Many type operations make it difficult to follow
  • 3
    No jobs
  • 1
    Use it only for timeoass not in production

Sign up to add or upvote consMake informed product decisions

What is PHP?

Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

What is Rust?

Rust is a systems programming language that combines strong compile-time correctness guarantees with fast performance. It improves upon the ideas of other systems languages like C++ by providing guaranteed memory safety (no crashes, no data races) and complete control over the lifecycle of memory.

Need advice about which tool to choose?Ask the StackShare community!

What companies use PHP?
What companies use Rust?
See which teams inside your own company are using PHP or Rust.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with PHP?
What tools integrate with Rust?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Nov 20 2019 at 3:38AM

OneSignal

PostgreSQLRedisRuby+8
9
4627
Oct 3 2019 at 7:13PM

Ably Realtime

JavaScriptPythonNode.js+8
5
3822
Jun 6 2019 at 5:11PM

AppSignal

RedisRubyKafka+9
15
1634
What are some alternatives to PHP and Rust?
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Java
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
HTML5
HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.
Node.js
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
See all alternatives