jphp-group/jphp has 1,712 GitHub stars and 166 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 02:23 UTC. Last push 2021-12-25.
JPHP - an implementation of PHP on Java VM
What you can do
- PHP 7.1+ (and many language features from PHP 7.2, 7.3, 7.4).
- JIT (~2.5x faster PHP 5.6, ~1.1x faster PHP 7.0, ~13% slower than PHP 7.4, bench).
- Using java libraries and classes in PHP code.
- Unicode for strings (UTF-16, like in Java)
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalJPHP - an implementation of PHP
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.
- Official Site: jphp.develnext.org
- Awesome JPHP
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 (https://github.com/jphp-group/develnext-ide), the current status and version of the project is BETA. The project has not yet been localized in English.
Goals
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:
- Ability to use java libraries in PHP (own extensions + other)
- Replacing the ugly runtime library of Zend PHP with a better runtime library.
- Using the PHP language not only on the web
- Multithreading like in Java and C#.
- Unicode Strings (Full Support for UTF-8, UTF-16).
- Creating GUI Android & Desktop applications on PHP language.
Features
- PHP 7.1+ (and many language features from PHP 7.2, 7.3, 7.4).
- JIT (~2.5x faster PHP 5.6, ~1.1x faster PHP 7.0, ~13% slower than PHP 7.4, bench).
- 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.2?
- All features except RFC: Parameter Type Widening
What JPHP supports from PHP 7.3?
- All features except RFC: Flexible Heredoc and Nowdoc Syntaxes
What JPHP supports from PHP 7.4?
- Typed Properties 2.0 (partly, references are not supported)
- Weak References
- Arrow Functions 2.0 (+ multiple line syntax)
- Allow throwing exceptions from __toString()
- Null Coalescing Assignment Operator
- numeric_literal_separator
- Spread Operator in Array Expression
Own Extensions
- Standard Library - own runtime standard library
- Http Server (+Web Sockets +Multithread)
- GUI (JavaFX or SWT)
- Git (based on JGit)
- JSoup - for parsing html in jQuery style.
- SQL (supports MySQL, PostgreSQL, SQLite, Firebird).
- SSH - for working with the ssh protocol.
- Yaml - for parsing and formating yaml.
- Compress - for working with tar, gz, bz2, lz4, zip archives.
- HttpClient - http client with promises.
- SemVer - for parsing versions in the SemVer standard.
- Mail - for sending emails via SMTP servers.
- MongoDB - a driver for Mongo DB 3.0+.
Documentation
- You can find the latest api documentation here: jphp-runtime/api-docs
- Wiki here: read
Getting started (Hello World)
- Install jphp package manager (jppm), how to install.
- Init new project (jppm package) with default values:
jppm init
- Run in console
jppm start.
You will see Hello World in your console, the sources of this program will be in src/index.php.
- (Optional) To update jphp version of your old project:
jppm update jphp-core
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.
org.develnext.jphp:jphp-<module>:<version>-SNAPSHOT
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,890 starspublic-apis/public-apis
A collective list of free APIs
497,126 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
442,020 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,169 stars