PHP是否有像Java这样的虚拟机?

问题描述:

PHP是否有Java之类的虚拟机?

Does PHP have a virtual machine like Java?

是.

与运行PHP的平台无关,这些脚本被编译为相同的字节码,并由Zend Engine运行.

Independently from the platform PHP is running on, the scripts are compiled into the same bytecode and run by the Zend Engine.

与Java的区别在于,该编译后的代码通常不存储在单独的文件中,并且每次执行时都会重新编译脚本(但是,请参阅操作码缓存).

The difference from Java is that this compiled code is usually not stored into separate files and the scripts are re-compiled on each execution (however, see opcode caches).