Skip to content
forked from jphp-group/jphp

An alternative to Zend PHP, like JRuby and Jython only for PHP

License

Notifications You must be signed in to change notification settings

AppSecAI-TEST/jphp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JPHP - an implementation of PHP

Build Status Download Documentation Status

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

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 (https://github.com/jphp-compiler/develnext), 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:

  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

Features

  • PHP 5.6+ (some language features from PHP 7).
  • JIT (~2.5 faster PHP 5.6, ~1.1 faster PHP 7), Optimizer - Performance benchmarks
  • 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 (Swing or JavaFX)
  • Embedded cache system for classes and functions
  • Optional Hot Reloading for classes and functions
  • Ability to use on Android OS (not yet)

What JPHP supports from PHP 7?

  • Context Sensitive Lexer.
  • Fix list() behavior inconsistency (SNAPSHOT).
  • Throwable Interface (SNAPSHOT).
  • Group Use Declarations (SNAPSHOT).
  • Uniform Variable Syntax (SNAPSHOT, partly).

Documentation

Getting started (Hello World)

http://j-php.net/wiki/Getting-started

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

About

An alternative to Zend PHP, like JRuby and Jython only for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 74.1%
  • PHP 25.0%
  • Other 0.9%