Originally published on php2rust.dev — part of the PHP to Rust course. View this lesson on the original site.

This guide was born out of frustration at how the industry often devalues PHP developers, as if we're somehow less capable. That's nonsense. PHP powers a huge chunk of the web. The skills you've built are real. Adding Rust to your CV might just give you the edge in an extremely competitive market: it signals systems thinking, performance awareness, and a willingness to level up. You're not catching up, you're expanding.

This course is written for PHP developers who want to learn Rust. If you've built backends, APIs, or web apps in PHP, you already have a great foundation. Rust offers memory safety and performance without a garbage collector, and many of its concepts will feel familiar, just with different rules and tooling.

By the end of this chapter, you'll understand what makes Rust unique and why it's worth learning. You'll see how it compares to what you know from PHP and gain the confidence to start writing your first Rust programs.

What is Rust?

"Rust is a general-purpose programming language emphasizing performance, type safety, and concurrency. It enforces memory safety, meaning that all references point to valid memory, without a garbage collector. To simultaneously enforce memory safety and prevent data races, its 'borrow checker' tracks the object lifetime of all references in a program during compilation."

, According to Wikipedia

If you're used to PHP, that might sound unfamiliar, PHP manages memory for you. Rust does things differently, but many of the ideas (functions, structs, error handling, modules) will connect to what you know.

What you'll need

Ideally, you'll have some awareness of PHP basics: variables, functions, arrays, and how to run scripts from the command line. The course will offer support in this area too, with optional PHP refreshers and comparisons along the way. You don't need to be an expert, just comfortable enough to follow along.

Technical requirements

  • Any operating system (Windows, macOS, or Linux)
  • Version control: Git
  • A text editor or IDE (VS Code is used in the examples, but any editor works)

What's next

Before we jump into code examples, let's explore what Rust is good at.

From PHP to Rust — Getting Started with Rust