All Projects → jphp-group → Jphp

jphp-group / Jphp

Licence: apache-2.0
JPHP - an implementation of PHP on Java VM

Programming Languages

java
68154 projects - #9 most used programming language
PHP
23972 projects - #3 most used programming language
shell
77523 projects
Batchfile
5799 projects
HTML
75241 projects
Inno Setup
370 projects

Projects that are alternatives of or similar to Jphp

Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+68.29%)
Mutual labels:  compiler, jit, jvm
Enso
Hybrid visual and textual functional programming.
Stars: ✭ 5,238 (+214.59%)
Mutual labels:  compiler, jit
Perlito
"Perlito" Perl programming language compiler
Stars: ✭ 396 (-76.22%)
Mutual labels:  compiler, jvm
Rustc codegen cranelift
Cranelift based backend for rustc
Stars: ✭ 675 (-59.46%)
Mutual labels:  compiler, jit
Numpile
A tiny 1000 line LLVM-based numeric specializer for scientific Python code.
Stars: ✭ 341 (-79.52%)
Mutual labels:  compiler, jit
Dora
Dora VM
Stars: ✭ 371 (-77.72%)
Mutual labels:  compiler, jit
Jtransc
Bytecode to source converting Java & Kotlin code into JavaScript, C++, D, C#, PHP, AS3, Dart and Haxe and run it everywhere. Also use JVM code in your favourite language as a library.
Stars: ✭ 532 (-68.05%)
Mutual labels:  compiler, jvm
jvm
Pure Rust implementation of the JVM 7 specification
Stars: ✭ 27 (-98.38%)
Mutual labels:  jvm, jit
Llvm Tutorial Standalone
DEPRECATED (Use: https://github.com/llvm-hs/llvm-hs-kaleidoscope )
Stars: ✭ 38 (-97.72%)
Mutual labels:  compiler, jit
Nativejit
A C++ expression -> x64 JIT
Stars: ✭ 999 (-40%)
Mutual labels:  compiler, jit
Leekscript V2
A dynamically typed, compiled just-in-time programming language used in Leek Wars' AIs
Stars: ✭ 46 (-97.24%)
Mutual labels:  compiler, jit
Enso Archive
Looking for Enso, the visual programming language? ➡️ https://github.com/enso-org/enso
Stars: ✭ 305 (-81.68%)
Mutual labels:  compiler, jit
yarrow
[yarrow] JVMCI based optimizing compiler for HotSpot VM
Stars: ✭ 21 (-98.74%)
Mutual labels:  jvm, jit
Ilgpu
ILGPU JIT Compiler for high-performance .Net GPU programs
Stars: ✭ 374 (-77.54%)
Mutual labels:  compiler, jit
go-jdk
Run JVM-based code in Go efficiently
Stars: ✭ 61 (-96.34%)
Mutual labels:  jvm, jit
Dynarmic
An ARM dynamic recompiler.
Stars: ✭ 475 (-71.47%)
Mutual labels:  compiler, jit
Jit Compiler
JIT compiler in Go
Stars: ✭ 70 (-95.8%)
Mutual labels:  compiler, jit
Lightbeam
Lightbeam has moved and now lives in the Wasmtime repository!
Stars: ✭ 253 (-84.8%)
Mutual labels:  compiler, jit
openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+78.56%)
Mutual labels:  jvm, jit
Tinycc
Unofficial mirror of mob development branch
Stars: ✭ 784 (-52.91%)
Mutual labels:  compiler, jit

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 (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:

  1. Ability to use java libraries in PHP (own extensions + other)
  2. Replacing the ugly runtime library of Zend PHP with a better runtime library.
  3. Using the PHP language not only on the web
  4. Multithreading like in Java and C#.
  5. Unicode Strings (Full Support for UTF-8, UTF-16).
  6. 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

Documentation

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.

  1. (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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].