Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PHP have a virtual machine like Java?

Does PHP have a virtual machine like Java?

like image 614
Christopher Altman Avatar asked Aug 01 '10 03:08

Christopher Altman


1 Answers

Yes.

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

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).

like image 88
Artefacto Avatar answered Oct 04 '22 17:10

Artefacto