Skip to main content

· One min read
Jakub Kozłowski

Scala.php has been discontinued.

Despite immense1 community2 interest3, we've struggled to get funding for the project. In addition, this has always been an April Fools' Day joke, so its future was doomed from day 1.

Thank you for your interest in Scala.php and see you next year! Perhaps we'll target a more pragmatic language this time, such as Go.

· One min read
Jakub Kozłowski

UPDATE: Scala.php is now discontinued. See the denouncement post.

Scala.php 0.1.1 has been released!

This is the first public release of Scala.php.

Scala.php is a PHP backend for the Scala compiler: it takes your Scala code and outputs PHP code from it, which you can include into an existing PHP application, run on its own, or package into a library.

You can learn more about its features on the homepage, or you can go ahead and get started.

In the meantime, here's a demo:

src/main/scala/Demo.scala
import java.nio.file.Files
import java.nio.file.Paths
import scala.io.StdIn

object Demo {

def main(
args: Array[String]
): Unit = {

println("What's your name?")
val name = StdIn.readLine()

val greeting = s"Hello $name!"

Files.writeString(Paths.get("greeting.txt"), greeting)

println(Files.readString(Paths.get("greeting.txt")))
}

}
Output
> What's your name?
< Jakub
> Hello Jakub!