您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

将PHP源码编译成JVM字节码的编译器:JPHP

2024/4/4 21:29:20发布17次查看
jphp是一个类似于javac的编译器,它能够将php源代码编译成jvm字节码的编译器。然后就实现了让php程序运行在java虚拟机器上。 它支持许多php5.3+的特性。jphp与 jruby和jython相似。
支持: jdk 1.6+ (openjdk, oracle)。
目标jphp不是 zend php 引擎或facebook hhvm的一个代替。它并不想实现zend运行库(比如:curl, prce等)。这个项是为了:
能够在php中使有用java对象通过 jit 和 jvm提升性能利用更好的运行时库来代替zend php的丑陋的运行时库让php不单只能用于开发web应用also: unicode for strings and threads特性jit (2x - 10x faster php 5.4)optimizer (constant expressions, inline functions, etc.)using java libraries and classes in php code.unicode for strings (utf-16, like in java)threading, socketsenvironment architecture (like sandbox objects in runkit zend extension).gui (based on swing, improved - more flexible layouts)embedded cache system for classes and functionsoptional hot reloading for classes and functions语言支持的特性(without zend runtime libraries)
php 5.2+ fully support (with oop)closures (php 5.3), auto-binding $this in closures (php 5.4)namespaces fully support (php 5.3)spl autoloading for classes (php 5.3)iterators, arrayaccess, serializabletype hinting for classes, arrays, callable (php 5.4)array short syntax (php 5.4)ternary short cut ?:, nowdoc, __callstatic, __invoke (php 5.3)late static binding (php 5.3)gc for cyclic references (php 5.3)class::{expr}(), (new foo)->bar() (php 5.4)try finally (php 5.5)array and string literal dereferencing (php 5.5)__debuginfo for var_dump (php 5.6)function array dereferencing has been added, e.g. foo()[0] (php 5.4) constants can be declared outside a class using the const keyword. (php 5.3)dynamic access to static methods (php 5.3)exceptions can be nested (php 5.3)::class system constant (php 5.5)还不支持什么?
traits (php 5.4)generators (php 5.5)goto (php 5.3)list() in foreach (php 5.5)binary number format, e.g. 0b001001101 (php 5.4)项目主页:http://www.open-open.com/lib/view/home/1395628572618
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product