A course for PHP developers

You know PHP.Now learn Rust.

Same mental models, new language. Every reading, quiz and code exercise puts Rust next to the PHP you already write, so you're translating ideas instead of starting from a blank page.

  • queue workers
  • CLI tools
  • WebAssembly
  • a second language
Sound on · narrated
Read the transcript

You already think like a developer. You know PHP: arrays, classes, Composer, the lot. So why learn Rust from a blank page?

PHP to Rust is a course built for PHP developers. Every concept is mapped to something you already know. Your associative array? Meet HashMap. Those null checks? Meet Option. And try-catch? Say hello to Result.

Each section mixes a short reading and a quiz. You run the Rust yourself, in the Playground or with cargo test on your machine. Mark a lesson read as you go, and earn your certificate at the end.

Whether it's a faster worker, a handy CLI, or your first step into WebAssembly, add Rust alongside PHP, not instead of it.

You know PHP. Now learn Rust. Start today at php2rust.dev.

How the lessons read

Same idea, left and right.

Every concept starts from the PHP you'd write today. Pick one to see how a lesson frames it.

PHPprices.php
$prices = ['tea' => 2.5, 'cake' => 3.0];
$prices['scone'] = 2.75;

foreach ($prices as $item => $price) {
    echo "$item: $price\n";
}
Rustmain.rs
use std::collections::HashMap;

let mut prices = HashMap::from([("tea", 2.5), ("cake", 3.0)]);
prices.insert("scone", 2.75);

for (item, price) in &prices {
    println!("{item}: {price}");
}

Watch for: PHP arrays keep insertion order; a HashMap doesn’t. Use a Vec of tuples, or the indexmap crate, when order matters.

How each section works

Read it, check it, write it.

  1. Read the comparison

    Short readings that map each Rust concept to what you know in PHP.

    PDF download
  2. Check with a quiz

    Multiple-choice questions on the Rust, plus optional PHP refreshers.

    instant feedback
  3. Write real code

    Exercises you run locally or in the Rust Playground. The starter includes cargo test.

    run it yourself
  4. Earn the certificate

    Finish every section to complete the course and get your certificate.

    on completion
Who it's for

Add Rust alongside PHP.

You don't need to rewrite your app. Use Rust for the parts where it pays off.

fn worker()

Queue workers

Move hot, long-running jobs into a fast, memory-safe binary.

cargo run

CLI tools

Ship a single executable your team can run anywhere, no PHP runtime needed.

wasm32

Systems & WebAssembly

Explore lower-level work with an on-ramp that starts from familiar ground.

impl Learn

A second language

Learn something new without starting from zero. Your PHP experience carries over.

Ready to write your
first fn main()?

Sign up or log in to start the course.