• Web Server
  • GUI Application
  • Multi-threading
  • Unicode Strings
  • New API
String::shuffle($str); // New API for primitive types

// API for Streams instead of fopen, fclose, etc.
Stream::getContents('path/to/file');

// API for regex instead of preg_*
$valid = Regex::match('^[a-z]+$', $str);

// Flow API for iterators and arrays
echo Flow::of([1, 2, 3])
     ->map(function($n) { return $n * 10; })
     ->reduce(function(&$r, $n) { $r += $n; });
$server = new WebServer(function($req, $res) {
    echo "Hello World!";
});

// Execute requests in isolated environments
$server->isolated = true;

// Hot Reload like in PHP (F5 mode)
$server->hotReload = true;

// finally run at localhost:8080
$server->run();
$thread = new Thread(function () {
    $i = 0;

    while (true) {
         $i++;
         echo $i, "\n";

         sleep(2); // every 2 seconds
    }
});

$thread->start(); // start thread
// Unicode like in Java, UTF-16

// Programing language
$str = "プログラミング言語";

// Get length of the unicode string
echo String::length($str);

// Change symbol by index
$str[1] = '語';

echo $str;
$server = new WebServer(function($req, $res) {
    echo "Hello World!";
});

// Executes requests in isolated environments
$server->isolated = true;

// Hot Reload like in PHP (F5 mode)
$server->hotReload = true;

// finally run at localhost:8080
$server->run();

JPHP

An alternative to PHP on the JVM

 
Get Started

PHP on the Java VM

JIT, Multi-Threading, Unicode, GUI, Android and Embedded Web Applications.

Amazing Features

 

High Performance

JIT + Optimizer = 1x - 10x faster PHP 5.6

New API

A better std library, more elegant and powerful.

GUI, Game, Android

Use the php language not only for web apps.

Web Apps

Develop RIA modern web applications with JPHP

Твиты от @jphpcompiler