Skip to main content


PHP backend for Scala

Your favorite language... transpiled from Scala!

Scala.php lets you use the features of Scala to build applications in the language you love, PHP.

Seamless interoperability with PHP

You can mix Scala and PHP syntax in the same project, allowing you to benefit from the best of both worlds.

Reuse Scala Libraries

Just like Scala.js and Scala Native, Scala.php allows you to use the entire ecosystem of Scala libraries - as long as they publish Scala.php-compatible artifacts.

Make some $, fast.

With Scala.php, you get $ for free, any time you define a variable!

val greeting = "hello"
$greeting = "hello"

explode strings like it's 2000.

Scala.php's seamless interop allows you to easily call PHP functions from Scala:

@php.native def explode(separator: String, string: String): Array[String] = php.native

explode(" ", "Hello world!") // Array("Hello", "world!")

upcomingMigrate to PHP, one step at a time.

Interop works both ways - write your new code in PHP and reuse your old Scala at the generous price of zero!

@php.exported def boringFunctionalCode(i: Int) = i + 1
require "legacy.php";

// now we're talking!
echo boringFunctionalCode(42);
Get started now!


See what the early users have to say about Scala.php:

Ay yo, you know, I gotta give mad props to Scala.php, cuz it's like taking the best of both worlds and mixin' 'em up like a bomb-ass cocktail. It's like, Scala's got that smooth vibe, and PHP's got that hustle, put 'em together and you got yourself a party.

Snoop Dogg, genius, billionaire, playboy, philanthropist

I was skeptical at first, but after trying Scala.php, I was convinced. It's the best thing since sliced bread!

Jane Doe, former baker

You're a sick guy, you know that?

Josh Long, PHP developer advocate

This shit wasn't part of the job description

Łukasz Biały, Scala developer advocate

You're telling me I could've been doing this instead of building keyboards?

Kasper Kondzielski, Neovim enjoyer