Skip to content
An alternative to Zend PHP, like JRuby and Jython only for PHP
Java PHP Other
Branch: master
Clone or download
dim-s Merge pull request #323 from MWGuy/jppm-templater
Add template system for jppm
Latest commit 6072c64 Sep 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bench Upgrade gradle to 5.1.1 Jan 17, 2019
exts Fix issue with system default timezone. Aug 10, 2019
gradle/wrapper Upgrade gradle to 5.1.1 Jan 17, 2019
jphp-core [WIP] Bugfix. Jun 7, 2019
jphp-debugger Change extends to implements in DebugTickHandler. May 10, 2019
jphp-runtime Merge branch 'master' into date_time Jul 18, 2019
jphp-scripting Upgrade gradle to 5.1.1 Jan 17, 2019
packager Add `default` field for templates Sep 1, 2019
sandbox Upgrade gradle to 5.1.1 Jan 17, 2019
.gitattributes Fix jppm. Apr 10, 2018
.gitignore JPPM update, jphp-runtime. May 2, 2018
.gitmodules Updates Apr 22, 2014
.travis.yml Temporary disable OracleJDK 8 build on Travis. Jul 17, 2019 Add May 2, 2018
LICENSE Update LICENSE May 12, 2015 Update Oct 4, 2018
build.gradle Fix tests. Apr 15, 2018
gradlew fixup! fixup! fixup! Add date_default_timezone functions. Jun 2, 2019
gradlew.bat Add array filter for fs::scan() and fs::clean(). Sep 27, 2017
jppm.gradle Fixes. May 2, 2018
package.php.yml Big Update. May 1, 2018
settings.gradle Upgrade gradle to 5.1.1 Jan 17, 2019

JPHP - an implementation of PHP

Build Status

JPHP is a new implementation for PHP which uses the Java VM. It supports many features of the PHP language (7.1+).

How does it work? JPHP is a compiler like javac, it compiles php sources to JVM bytecode and then can execute the result on the Java VM.

In Production

We develop a new IDE for beginners like Game Maker or Scirra Construct. It's based on JPHP, JavaFX, Java 8, Gradle and allows to create desktop games and apps for Linux, Windows and Mac (maybe Android and other platforms in future). The project name is DevelNext (, the current status and version of the project is BETA. The project has not yet been localized in English.


JPHP is not a replacement for the Zend PHP engine or Facebook HHVM. We don’t plan to implement the zend runtime libraries (e.g. Curl, PRCE, etc.) for JPHP.

Our project started in October 2013. There were a few reasons for that:

  1. Ability to use java libraries in PHP
  2. Upgrading performance via JIT and JVM
  3. Replacing the ugly runtime library of Zend PHP with a better runtime library.
  4. Using the PHP language not only on the web
  5. Also: unicode for strings and threads


  • PHP 5.6+ (and many language features from PHP 7.0 and 7.1).
  • JIT (~2.5x faster PHP 5.6, ~1.1x faster PHP 7.0, ~1.5x slower PHP 7.1).
  • Using java libraries and classes in PHP code.
  • Unicode for strings (UTF-16, like in Java)
  • Threading, Sockets, Environment architecture (like sandbox objects in the runkit zend extension).
  • GUI (JavaFX or SWT)
  • Embedded cache system for classes and functions
  • Optional Hot Reloading for classes and functions
  • Ability to use on Android OS : jphp-android

What JPHP supports from PHP 7.0, 7.1?

  • All features except anonymous classes.

Own Extensions


Getting started (Hello World)

  1. Install jphp package manager (jppm), how to install.
  2. Init new project (jppm package) with default values:
jppm init
  1. Run in console jppm start.

You will see Hello World in your console, the sources of this program will be in src/index.php.

How to run benchmarks?

// via jphp
./gradlew bench

// via php
php -f bench/src/bench.php

Build SNAPSHOT from sources

Use gradle install to build and install the jphp modules and libraries into the mavel local repository. After this, you can use jphp in your projects as a maven dependency.


You can’t perform that action at this time.