Polyglot Artisan

Toolkit for switching languages

Quick lookups for when you are mid-task: a concept map, Laravel commands translated to Laravel Go and Laravel Rust, a CLI command map, the classic gotchas, a learning roadmap, a guide to choosing a stack and curated resources.

Versions this site covers

Code is written for the versions below and works on anything newer unless a snippet carries a version tag such as Go 1.27+. Latest releases checked December 5, 2026.

PHP

Written for
8.4
Latest release
8.6.0
Works on
PHP 8.4 and newer

Property hooks, asymmetric visibility and new without brackets are used freely. Newer features such as the PHP 8.5 pipe operator and PHP 8.6 partial application appear as "New in" notes. Release notes

Go

Written for
1.26
Latest release
1.27.4
Works on
Go 1.26 and newer

Generics, range-over-func iterators, wg.Go, new(expr) and errors.AsType are used freely. Go 1.27 additions such as generic methods and encoding/json/v2 appear as "New in" notes. Release notes

Rust

Written for
1.85, 2024 edition
Latest release
1.100.1
Works on
Rust 1.85 and newer

Every snippet uses the 2024 edition. Later additions such as let chains (1.88) appear as "New in" notes. Release notes

Laravel

Written for
13.x
Latest release
13.45.0
Works on
Laravel 13 on PHP 8.3+

Laravel 13 conventions: attribute-based models such as #[Fillable], and PreventRequestForgery for CSRF. Most snippets also work on Laravel 12. Release notes

Laravel Go

Written for
0.2.0
Latest release
0.2.0
Works on
v0.2 on Go 1.27+

Beta: the API may change before 1.0. Every snippet comes from the v0.2.0 docs. Release notes

Laravel Rust

Written for
0.2.0
Latest release
0.2.0
Works on
v0.2 on Rust 1.99+ (2024 edition)

Beta: the API may change before 1.0. Every snippet comes from the v0.2.0 docs. Release notes

Rosetta map

The same idea in each language, one row per concept.

Types & values

ConceptPHPGoRust
Integerint (64-bit, overflows to float)int, int64, uint8… (fixed size, wraps)i32, i64, u8, usize… (panics on overflow in debug)
Floatfloatfloat64, float32f64, f32
Booleanboolboolbool
Stringstring (byte string)string (immutable UTF-8 bytes)String (owned) and &str (borrowed view)
CharacterNo type: a one-char stringrune (Unicode code point), bytechar (Unicode scalar), u8
Null / absentnull, ?Usernil for pointers, maps, slices, interfaces; zero values for the restOption<T>: Some(x) or None
Any typemixedany (alias of interface{})Generics, or Box<dyn Any> (rare)
Union typeint|stringOnly in generic constraints: int | stringenum with one variant per case
Convert / cast(int) $x, intval($s)int64(x), strconv.Atoi(s)x as i64, s.parse::<i32>()?, i64::from(x)
Constantsconst MAX = 10;, define()const Max = 10 (compile-time; untyped unless you give it a type)const MAX: u32 = 10;, static
Check type at runtimeinstanceof, get_debug_type()Type switch: switch v := x.(type)match on enum variants; downcast_ref for dyn Any
Integer division7 / 2 is 3.5; use intdiv(7, 2)7 / 2 is 37 / 2 is 3

Syntax

ConceptPHPGoRust
Declare a variable$x = 1;x := 1 or var x intlet x = 1; or let mut x = 1;
SemicolonsRequiredNot written (inserted by the compiler)Required; a final expression without ; is the block's value
Interpolation"Hi {$name}"fmt.Sprintf("Hi %s", name)format!("Hi {name}")
Print / debugecho, dump(), dd()fmt.Println, fmt.Printf("%+v", v)println!, dbg!(v), {:?}
Functionfunction add(int $a, int $b): intfunc add(a, b int) intfn add(a: i32, b: i32) -> i32
Closurefn($x) => $x * 2func(x int) int { return x * 2 }|x| x * 2
Ternary$a ? $b : $cNone: use if/elseif a { b } else { c } is an expression
Null coalescing$a ?? 'default'Explicit if v == nil checkopt.unwrap_or("default")
Match / switchmatch ($x) { 1, 2 => 'low', default => 'high' }switch x { case 1, 2: … default: … } (no implicit fallthrough)match x { 1 | 2 => "low", _ => "high" } (must be exhaustive)
Loop a collectionforeach ($items as $k => $v)for k, v := range itemsfor (i, v) in items.iter().enumerate()
Doc comments/** PHPDoc */// Name does… above the declaration/// Markdown docs, with runnable examples
Variadicfunction f(...$args), f(...$list)func f(args ...int), f(xs...)Take a slice &[T], or use a macro

Data structures

ConceptPHPGoRust
List[1, 2, 3]Slice: []int{1, 2, 3}vec![1, 2, 3] (Vec<i32>)
Fixed-size arraySplFixedArray[3]int{1, 2, 3}[1, 2, 3] ([i32; 3])
Map['a' => 1]map[string]int{"a": 1}HashMap::from([("a", 1)])
Ordered mapArrays keep insertion orderMaps are unordered: sort the keysBTreeMap (sorted) or the indexmap crate
Setarray_unique() or array keysmap[string]struct{}HashSet<T>, BTreeSet<T>
Append$a[] = 4;a = append(a, 4)v.push(4);
Lengthcount($a)len(a)v.len()
Containsin_array($x, $a, true)slices.Contains(a, x)v.contains(&x)
Map / filterarray_map, array_filter, collect()for loops; slices and maps packages.iter().map(…).filter(…).collect()
Sortsort($a), usort($a, fn…)slices.Sort(a), slices.SortFunc(a, cmp)v.sort(), v.sort_by_key(|u| u.age)
Tuple / multiple values[$a, $b] = f();a, b := f()let (a, b) = f();
Queue / stackSplQueue, array_shift, array_popSlice operations, container/listVecDeque, Vec::pop

OOP & abstraction

ConceptPHPGoRust
Class / typeclass User { }type User struct { } + methodsstruct User { } + impl User { }
Constructor__construct() with property promotionConvention: func NewUser(…) *UserConvention: fn new(…) -> Self
Methodpublic function name(): stringfunc (u *User) Name() stringfn name(&self) -> &str
Visibilitypublic, protected, privateCapitalised = exported; lowercase = package-privatePrivate by default; pub, pub(crate)
Interfaceinterface Shape + implements Shapetype Shape interface { … }, satisfied implicitlytrait Shape + impl Shape for Circle
InheritanceextendsNone: struct embeddingNone: traits + composition
Traits / mixinstrait HasSlug + use HasSlug;Embedding a structTrait default methods
Static methodpublic static function make()Package-level functionAssociated function: User::new()
GenericsPHPDoc @template T, checked by PHPStanfunc Map[T, U any](…)fn map<T, U>(…) with bounds T: Display
Magic methods__get, __call, __toStringNone; String() string (Stringer)Traits: Display, Deref, From/Into, Index
Enumenum Status: string { case Active = 'active'; }const ( Active Status = iota … )enum Status { Active, Banned { reason: String } }
Equality== (loose), === (strict / same instance)== on comparable structs#[derive(PartialEq)], then ==

Errors & nullability

ConceptPHPGoRust
Signal an errorthrow new DomainException('…')return nil, errors.New("…")return Err(AppError::NotFound)
Handle ittry { } catch (E $e) { }if err != nil { … }match res { Ok(v) => …, Err(e) => … }
Pass it upLet it bubblereturn fmt.Errorf("load: %w", err)The ? operator
Custom errorclass NotFound extends ExceptionA type with Error() stringAn enum with #[derive(thiserror::Error)]
Inspect a wrapped error$e->getPrevious()errors.Is, errors.AsMatch the variant; downcast_ref with anyhow
Cleanupfinallydefer f.Close()Drop runs when the value goes out of scope
CrashUncaught exception, exit()panic() (for bugs, not control flow)panic!, .unwrap(), .expect("…")
Optional value?User / null*User (nil) or (User, bool)Option<User>
Null-safe chain$user?->profile?->bioExplicit nil checksuser.and_then(|u| u.profile), or ? inside a fn returning Option
Default when missing$x ?? 'n/a'v, ok := m[k]; if !ok { … }.unwrap_or("n/a"), .unwrap_or_default()

Tooling

ConceptPHPGoRust
Package managerComposerThe go command (modules)Cargo
RegistryPackagistAny git repo via proxy.golang.org; browse on pkg.go.devcrates.io; docs on docs.rs
Version managerHerd, Homebrewtoolchain line in go.mod, or go.dev/dlrustup
FormatterPint, PHP-CS-Fixergofmt (built in)cargo fmt (rustfmt)
Static analysisPHPStan / Larastan, Psalmgo vet, staticcheck, golangci-lintThe compiler + cargo clippy
Test runnerPest, PHPUnitgo testcargo test
DebuggerXdebugDelve (dlv)lldb / gdb, CodeLLDB in VS Code
Language serverIntelephense, Phpactorgoplsrust-analyzer
REPLphp artisan tinker, php -aNone built in; go.dev/playNone built in; play.rust-lang.org, evcxr
ProfilerXdebug profiler, Blackfire, SPXpprofperf, samply, cargo-flamegraph
API docsphpDocumentorgo doc, pkg.go.devcargo doc, docs.rs

Project files

ConceptPHPGoRust
Manifestcomposer.jsongo.modCargo.toml
Lockfilecomposer.lockgo.sum (checksums)Cargo.lock
Dependencies live invendor/Module cache (go env GOMODCACHE); go mod vendor optional~/.cargo/registry; builds go to target/
Entry pointpublic/index.phpmain.go: package main + func main()src/main.rs: fn main()
Library rootPSR-4 src/Each directory is one packagesrc/lib.rs
Namespacenamespace App\Models;package modelsmod models;
Importuse App\Models\User;import "example.com/app/models"use crate::models::User;
AutoloadingComposer PSR-4 autoloaderCompiler resolves importsCompiler resolves modules
Environment config.env + env()os.Getenv, godotenvstd::env::var, dotenvy
Build outputNone (source + OPcache)One static binaryOne binary in target/release/
Project scripts"scripts" in composer.jsonMakefile or TaskfileCargo aliases in .cargo/config.toml, or just

Laravel ↔ Laravel Go ↔ Laravel Rust

Where each Laravel habit lives in the other two frameworks.

Project & CLI

TaskLaravelLaravel GoLaravel Rust
New projectlaravel new bloglaravel new blog --go (Inertia + React starter)laravel new blog --rust (Inertia + React starter)
Run dev servercomposer run dev or php artisan servelaravel dev (server, queue worker and Vite, rebuilds on save) or laravel servelaravel dev (server, queue worker and Vite, rebuilds on save) or laravel serve
Make a controllerphp artisan make:controller PostControllerNo generator (not in v0.2): write handler funcs in a handlers/posts packageNo generator (not in v0.2): write async handler fns, e.g. src/http/handlers/posts.rs
Make a modelphp artisan make:model Post -mNo generator (not in v0.2): a struct in models/No generator (not in v0.2): a #[model] struct in src/models/
Make a migrationphp artisan make:migration create_posts_tablelaravel make:migration create_posts_tablelaravel make:migration create_posts_table
Full CRUD scaffoldphp artisan make:model Post -mcr (no views)No scaffold (not in v0.2); route.Resource("posts", routing.Resource{…}) wires the CRUD routesNo scaffold (not in v0.2)
List routesphp artisan route:listlaravel route:list (or go run . route:list)laravel route:list (or cargo run -- route:list)
App key / secretsphp artisan key:generatelaravel key:generate (laravel new sets APP_KEY for you)laravel key:generate (laravel new sets APP_KEY for you)
Environment checkphp artisan aboutNo about command (not in v0.2); laravel list shows every commandNo about command (not in v0.2); laravel list shows every command
Config files.env + config/*.php.env + a typed config.Config; settings that need code go in a Configure function in bootstrap/app.go.env + #[config::section] functions in src/config/*.rs

HTTP

TaskLaravelLaravel GoLaravel Rust
Define a routeRoute::get('/posts', [PostController::class, 'index'])route.Get("/posts", posts.Index) in routes/web.goroute.get("/posts", posts::index)
Route parameter/posts/{id} + $id argument/posts/{post} + r.PathValue("post") or r.PathInt/posts/{post} + Params(id): Params<u64> extractor (or a post: Post argument)
Route groupRoute::prefix('api')->middleware('auth')->group(…)route.Prefix("/admin").Middleware(auth.Authenticate{}).Group(func(route *routing.Router) {…})route.prefix("/admin").middleware(Authenticate).group(|route| {…})
Read input$request->input('title')input, err := r.Bind[NewPost]() (struct with json tags)Valid(form): Valid<StorePost> for the body, Query(f): Query<Filters> for the query string
Validate$request->validate([...]) or a FormRequestStruct with a Rules() method, then form, err := r.Validate[StorePost]()#[laravel::input(fills = Post)] struct with #[validate(required, max_length(255))], taken as Valid<StorePost>
JSON responseresponse()->json($post, 201)web.JSON(post), or web.Created(post) for a 201Json(post), or Created<Post> for a 201
Render a viewview('posts.index', compact('posts'))web.View("posts.index", posts) (html/template), or inertia.Render("Posts/Index", inertia.Props{…})view("posts.index", data! { posts }) (Jinja), or inertia::render("Posts/Index", props! { posts })
Middlewarephp artisan make:middlewareA type with Handle(r *web.Request, next web.Next) *web.Response (no generator in v0.2)A #[middleware] async fn taking (request: Request, next: Next) (no generator in v0.2)
Current user$request->user()r.User[models.User]() (or models.CurrentUser)Authenticated(user): Authenticated<User> extractor, or Auth<User>

Data

TaskLaravelLaravel GoLaravel Rust
All rowsPost::all()model.Query[models.Post]().Get(r)Post::all().await?
Find or 404Post::findOrFail($id)model.Find[models.Post](r, id); its not-found error becomes a 404 via web.FailPost::find_or_fail(id).await?
WherePost::where('published', true)->get()model.Query[models.Post]().WhereEq("published", true).Get(r)Post::query().filter(Post::published_at.is_not_null()).get().await?
CreatePost::create([...])model.Create(r, &post)create!(Post { ..form }).await?
Eager-load relationPost::with('comments')->get()model.Query[models.Post]().With("user", "comments").Get(r)Post::query().with(Post::comments.with(Comment::user))
PaginatePost::paginate(15).Paginate(r, r.Page(15)).paginate(15).await?
Run migrationsphp artisan migratelaravel migrate (production: ./app migrate --force)laravel migrate (production: ./app migrate --force)
Roll backphp artisan migrate:rollbackNo rollback: migrations are forward-only, write a new migrationNo rollback: migrations are forward-only, write a new migration
Fresh + seedphp artisan migrate:fresh --seedlaravel migrate:fresh --seedlaravel migrate:fresh --seed
Regenerate entitiesNot needed (Eloquent reads columns at runtime)Not needed (models are hand-written structs)Not needed (#[model] structs are hand-written)

Background & ops

TaskLaravelLaravel GoLaravel Rust
Make a jobphp artisan make:job SendReportlaravel make:job SendReport (adds it to jobs.All)No generator (not in v0.2): #[derive(Queueable)] struct + #[job] impl, auto-discovered
Dispatch a jobSendReport::dispatch($user)queue.Dispatch(r, jobs.SendReport{UserID: user.ID})SendReport { user_id }.dispatch().await?
Run workersphp artisan queue:worklaravel queue:work (production: ./app queue:work)laravel queue:work
Schedule tasksSchedule::command(…)->daily() in routes/console.phps.Command("reports:send").Daily() in Schedule (commands/schedule.go); cron runs ./app schedule:runschedule.command("reports:send").daily() in a #[schedule::tasks] fn; cron runs schedule:run
Custom commandphp artisan make:commandlaravel make:command posts:pruneNo generator (not in v0.2): a #[command("posts:prune")] async fn in src/console/
Send mailMail::to($u)->send(new Welcome)mail.To(user).Queue(r, mails.Welcome{}) (or Send)mail::to(&user).queue(Welcome).await? (or send)
CacheCache::remember('k', 60, fn () => …)cache.Remember(r, "k", time.Hour, func(ctx context.Context) (T, error) {…})cache::remember("k", 10.minutes(), async || {…}).await?
File storageStorage::put('a.txt', $contents)storage.Put(r, "a.txt", contents)storage::put("a.txt", contents).await?
Run testsphp artisan testgo test ./... (feature tests use the laraveltest client)cargo test (#[laravel::test] functions)
Production buildcomposer install --no-dev -o + php artisan optimizego build -o app . (set GOOS/GOARCH to cross-compile)cargo build --release

CLI command map

Composer and PHP commands next to their Go and Cargo equivalents.

TaskPHPGoRust
Start a projectcomposer initgo mod init example.com/appcargo new app
Add a dependencycomposer require vendor/pkggo get example.com/pkg@latestcargo add pkg
Add a dev dependency / toolcomposer require --dev pestphp/pestgo get -tool golang.org/x/tools/cmd/stringercargo add --dev mockall
Remove a dependencycomposer remove vendor/pkgDelete the import, then go mod tidycargo remove pkg
Install from lockfilecomposer installgo mod downloadcargo fetch (or just cargo build)
Update dependenciescomposer updatego get -u ./... then go mod tidycargo update (compatible versions)
List outdatedcomposer outdatedgo list -m -u allcargo outdated (plugin)
Why is this installed?composer why vendor/pkggo mod why -m example.com/pkgcargo tree -i pkg
Dependency treecomposer show --treego mod graphcargo tree
Runphp script.phpgo run .cargo run
Build for productioncomposer install --no-dev -ogo build -o bin/app .cargo build --release
Fast type checkvendor/bin/phpstan analysego vet ./... (or go build ./...)cargo check
Run all testsphp artisan test / vendor/bin/pestgo test ./...cargo test
Run one testvendor/bin/pest --filter=creates_postgo test -run TestCreatePost ./...cargo test create_post
Race / safety checksn/ago test -race ./...The compiler (data races don't compile); cargo miri test for unsafe
Coveragevendor/bin/pest --coveragego test -cover ./...cargo llvm-cov or cargo tarpaulin (plugins)
Benchmarkvendor/bin/phpbench rungo test -bench=. ./...cargo bench
Formatvendor/bin/pintgo fmt ./...cargo fmt
Lintvendor/bin/phpstan analysegolangci-lint runcargo clippy
Security auditcomposer auditgovulncheck ./...cargo audit (plugin)
Read package docsPackage README / phpDocumentorgo doc net/http.Clientcargo doc --open
Quick experimentphp artisan tinker, 3v4l.orggo.dev/playplay.rust-lang.org
Cross-compilen/a (ship source)GOOS=linux GOARCH=arm64 go buildcargo build --target x86_64-unknown-linux-musl or cross build
Update the toolchainHerd, or brew upgrade phpDownload from go.dev/dl, or set toolchain in go.modrustup update
Clean build cachescomposer clear-cachego clean -cachecargo clean

Gotchas for PHP developers

The mistakes almost every PHP developer makes in the first month.

Go

Writing to a nil map panics

A declared but unmade map is nil: reads work, writes crash. Always create it: m := make(map[string]int) or m := map[string]int{}.

Slices share their backing array

b := a[:2] is a view, so b[0] = 9 changes a too, and append may or may not copy. Use slices.Clone(a) when you need an independent copy.

:= can shadow outer variables

Inside an if or for block, x, err := f() creates a new err and leaves the outer one untouched. Use = when the variable already exists.

A nil pointer in an interface is not nil

var p *MyErr; var err error = p gives err != nil == true, because the interface holds a type. Return a literal nil for "no error".

There are no exceptions

Errors are return values and you check each one: if err != nil { return err }. panic is for programmer bugs, not for 404s or validation.

Unused imports and variables don't compile

PHP lets them slide; Go refuses to build. Assign to _ while sketching, and let goimports manage imports.

Lowercase fields are invisible

Only Capitalised names are exported, and that includes encoding/json and template access. A name string field never appears in JSON; export it as Name string and add the tag json:"name".

Zero values instead of null

A missing string is "", a missing int is 0. To tell "not sent" from "empty", use a pointer (*string) or sql.NullString.

Concurrent map writes crash the program

Maps aren't safe across goroutines: you get fatal error: concurrent map writes. Guard with sync.Mutex and run tests with go test -race.

Date formats use a reference time

No Y-m-d: you write the date Mon Jan 2 15:04:05 2006 in your format, e.g. t.Format("2006-01-02").

Strings are bytes

len("é") is 2. for i, r := range s walks runes (characters); s[i] gives a byte. Use utf8.RuneCountInString for character counts.

Old tutorials copy loop variables

Since Go 1.22 each loop iteration gets a fresh variable, so the v := v trick in older code is no longer needed. Check the go line in go.mod.

Rust

String vs &str

String owns heap data; &str borrows a view of it. Take &str in function parameters and return String when you create text: fn greet(name: &str) -> String.

Assignment moves values

let b = a; moves a String or Vec, and a is unusable afterwards. Numbers and other Copy types are copied. Borrow with &a or call a.clone().

One writer or many readers

You can't hold a &mut while any & borrow is alive. Shorten borrows with smaller scopes, or collect what you need before mutating.

.clone() is fine while learning

Cloning to get past the borrow checker is a legitimate first step. Optimise later, when a profiler says it matters.

No null, and unwrap() panics

Missing values are Option<T>. .unwrap() crashes on None; prefer ?, if let Some(x) = …, or .unwrap_or(default).

Integer overflow panics in debug builds

With let x: u8 = 255;, x + 1 panics in debug builds and wraps to 0 in release (a constant like 255u8 + 1 is rejected at compile time). Say what you mean: checked_add, saturating_add or wrapping_add.

Async needs a runtime

async fn returns a future that does nothing until awaited, and main needs a runtime: #[tokio::main] async fn main(). Don't block inside async code; use tokio::task::spawn_blocking.

The orphan rule

You can't implement a foreign trait for a foreign type (e.g. Display for Vec<T>). Wrap it in a newtype: struct Tags(Vec<String>);.

? needs a matching error type

? converts errors with From. In apps, return anyhow::Result<T>; in libraries, define an enum with thiserror.

You can't index a string

s[0] doesn't compile because UTF-8 characters vary in width. Use s.chars().next(), or byte slices you know sit on character boundaries.

References in structs need lifetimes

struct Post { title: &str } needs <'a> annotations. While learning, store owned Strings instead.

Compile times are real

Use cargo check while editing, keep the dev profile for iteration, and a faster linker (mold or lld) for big projects. Release builds are slower to compile but much faster to run.

Roadmap from Laravel to Go and Rust

A paced path from zero to shipping a Laravel Go or Laravel Rust app, a few hours a week.

  1. Weeks 1–2

    Read both languages side by side

    • Variables, types, strings, collections and control flow in Go and Rust
    • Do the Tour of Go in full; Rust Book chapters 1–3
    • Use this site's Basics level with PHP as your anchor

    Build: A CLI that reads an orders CSV and prints totals per customer (Go first).

  2. Weeks 3–4

    Go: structs, interfaces and errors

    • Structs, methods, implicit interfaces, embedding
    • Errors as values: wrapping with %w, errors.Is/As
    • Modules, packages and go test with table-driven tests

    Build: A JSON API with net/http method routes over an in-memory list of posts, fully tested.

  3. Weeks 5–6

    Go: concurrency and databases

    • Goroutines, channels, select, context timeouts
    • errgroup and sync.Mutex; run everything with -race
    • Postgres with pgx, or sqlc for type-safe queries

    Build: A concurrent URL health checker, then move the posts API onto Postgres.

  4. Weeks 7–8

    Laravel Go: Laravel, compiled

    • laravel new blog --go, laravel dev, routes in routes/web.go and handler packages
    • Models with model.Query, relationships, forward-only migrations, factories and seeders
    • Session auth, r.Validate, queues, scheduling, mail, cache and Inertia pages

    Build: Port a small Laravel app (posts + comments + auth) to Laravel Go.

  5. Weeks 9–11

    Rust: ownership and the type system

    • Rust Book chapters 4–10: ownership, borrowing, structs, enums, Option/Result, traits, generics
    • Rustlings alongside the book
    • String vs &str, iterators and closures

    Build: Rewrite the orders CSV CLI in Rust with clap and serde.

  6. Weeks 12–13

    Rust: async and the web

    • Tokio tasks, .await, channels and timeouts
    • Axum routing, extractors and Tower layers
    • sqlx queries, serde JSON, tracing logs

    Build: Rebuild the posts JSON API with Axum + sqlx.

  7. Weeks 14–15

    Laravel Rust: Laravel on Axum

    • laravel new blog --rust, laravel dev, routes and extractor-based handlers
    • #[model] structs, create!, relationships and forward-only migrations
    • Valid<T> validation, #[job] queues, #[schedule::tasks] and #[laravel::test] feature tests

    Build: Port the same posts + comments + auth app to Laravel Rust.

  8. Week 16+

    Ship and compare

    • Multi-stage Docker builds and single-binary deploys
    • Observability: structured logs, OpenTelemetry traces, Prometheus metrics
    • Load-test the Laravel, Laravel Go and Laravel Rust versions and compare memory and p99

    Build: Deploy all three versions and write up where each one fits your work.

Which one should I reach for?

Rules of thumb, not laws. Stay in Laravel unless a need pushes you out.

NeedPickWhy
CRUD-heavy SaaS or admin panel, shipped fastLaravelEloquent, Filament, starter kits and first-party billing/auth: nothing in Go or Rust matches the speed of building CRUD.
Content site, marketing pages or a CMSLaravelBlade, Livewire and the ecosystem make content work cheap; raw speed rarely matters here.
Small automation inside an existing Laravel appPHPAn Artisan command or queued job beats a new service, deploy pipeline and language.
High-concurrency JSON API or gatewayGoGoroutines handle thousands of connections in little memory, and the stdlib HTTP server is production-ready.
A CLI you hand to other peopleGoOne static binary, cross-compiled with two environment variables; no runtime to install.
Infrastructure tooling, Kubernetes operatorsGoKubernetes, Docker and Terraform are written in Go, so client libraries and examples are first-class.
Realtime: many WebSocket connectionsGoCheap goroutines per connection; use Laravel Reverb if you are already a Laravel shop.
A Laravel team that needs a compiled serviceLaravel GoOfficial Laravel on Go's net/http: the same laravel CLI, migrations, queues, scheduler and Inertia, so the team is productive in days. Beta until 1.0.
Laravel-style Go app that can't absorb breaking changes yetGoUse the community Goravel framework: Laravel Go is pre-1.0 and may change APIs between releases, while Goravel has a longer track record.
CPU-heavy hot path: parsing, image or video workRustC-level speed without a garbage collector, with memory safety checked at compile time.
WebAssembly or edge functionsRustThe best WASM toolchain and tiny binaries; runs in browsers, Cloudflare Workers and Fastly.
Embedded, systems or memory-constrained workRustNo runtime, predictable memory, and the safety guarantees matter most here.
Laravel-style productivity with Rust's guaranteesLaravel RustOfficial Laravel on Axum + Tokio: models, validation, queues, scheduling, mail and Inertia, checked at compile time. Beta until 1.0.
Rewriting a working Laravel monolithLaravelDon't. Profile first, then extract only the hot spot into a Go or Rust service behind an API or queue.

Resources

Official docs, books, courses and playgrounds worth your time.

PHP Manual

Docs. The official language and function reference.

Supported PHP versions

Docs. Active support and security-fix dates for each release.

PHP: The Right Way

Book. Community guide to modern PHP practice.

PHP.Watch versions

Docs. What changed in every PHP release, feature by feature.

3v4l.org

Playground. Run a snippet on every PHP version at once.

PHPStan user guide

Docs. Static analysis: the closest PHP gets to a compiler.

Laravel documentation

Docs. Always points at the current release.

Laracasts

Course. Video courses on Laravel, PHP and more.

Laravel on YouTube

Course. Official channel: release walkthroughs and tutorials (laravel.com/learn points here).

Laravel News

Newsletter. Releases, packages and tutorials.

Spatie open source

Community. Hundreds of well-maintained Laravel packages.

A Tour of Go

Course. Interactive tour of the whole language.

Go documentation

Docs. Tutorials, guides and release notes.

Effective Go

Docs. How idiomatic Go is written.

The Go spec

Docs. Short, readable language specification.

Go by Example

Book. Annotated example programs for every feature.

Learn Go with Tests

Book. Learn the language test-first.

100 Go Mistakes

Book. Common mistakes and how to avoid them.

Go Playground

Playground. Run and share Go in the browser.

pkg.go.dev

Docs. Docs for the standard library and every public module.

Exercism Go track

Course. Free exercises with mentoring.

Golang Weekly

Newsletter. Weekly Go news and articles.

The Go Blog

Docs. Deep dives from the Go team.

Go Forum

Community. Ask questions, get answers.

The Rust Programming Language

Book. "The Book": start here.

Rust by Example

Book. Runnable examples for every concept.

Rustlings

Course. Small exercises to pair with the Book.

Comprehensive Rust

Course. Google's multi-day Rust course.

Standard library docs

Docs. Every type and trait in std.

The Cargo Book

Docs. Packages, workspaces, features, profiles.

docs.rs

Docs. Generated docs for every crate.

Asynchronous Programming in Rust

Book. Futures, async/await and executors.

Tokio tutorial

Course. Build a mini Redis while learning async Rust.

Zero To Production in Rust

Book. Building a production web API in Rust, end to end.

Rust API Guidelines

Docs. How to design idiomatic Rust APIs.

Rust Playground

Playground. Run, format and share Rust in the browser.

Exercism Rust track

Course. Free exercises with mentoring.

This Week in Rust

Newsletter. Weekly community newsletter.

Rust users forum

Community. Friendly help for learners.

Laravel Go documentation

Docs. Official guides for Laravel on Go (beta, v0.2).

Laravel Go installation

Docs. Needs Go 1.27+. Install the laravel CLI and create an app with laravel new --go.

go.laravel.com API reference

Docs. Package docs for every go.laravel.com package.

Laravel Go on GitHub

Community. Source, issues and releases.

Laravel Rust documentation

Docs. Official guides for Laravel on Rust (beta, v0.2).

Laravel Rust installation

Docs. Needs Rust 1.99+. Install the laravel CLI and create an app with laravel new --rust.

laravel-rust API reference

Docs. Generated docs for the laravel-rust crate.

Laravel Rust on GitHub

Community. Source, issues and releases; the guides live in docs/.

Axum docs

Docs. The web layer under Laravel Rust.

Goravel (community alternative)

Community. Community Laravel-style framework for Go.

Loco (community alternative)

Community. Community Rails/Laravel-style framework for Rust on Axum + SeaORM.