你可以“编译” PHP代码? [英] Can you "compile" PHP code?
问题描述
但是你可以编译php并上传一个二进制的ish文件,这将由字节码解释器运行?
在提出这个问题之后,Facebook推出了 PHP的HipHop ,这可能是迄今为止最好的PHP编译器世界上最大的10个网站)。
除此之外,googling PHP编译器
打开了多个第三方解决方案。
- 编译为原生二进制文件
- 现在不太活跃(2014年2月) - 2011年上次更新(2013年夏季最后一次更新)
- GitHub ,重写的GitHub
- 使用编译器自由开放PHP实现PHP
- 编译为原生二进制文件(Windows,Linux)
- 自2010年起停止提供,直到贡献者找到 - 网站关闭,停留在GitHub上,最后更改是从2012年初开始
- PHP的PECL扩展
- 实验
- 编译为PHP字节码,它在加载PHP解释器的Windows二进制文件中(请参阅
bcompiler_write_exe_footer()
手动) - 现已停产(2014年2月) - 2011年上次更改
- 维基百科, a href =http://www.ibm.com/developerworks/ibm/zero/ =nofollow noreferrer> IBM
- WebSphere sMash
- 支持IBM
- 编译为Java字节码
- 现在(2014年2月)停止销售 - 网站下滑,看起来像2008年和2009年大幅炒作
- 编译为独立的Windows二进制文件
- 二进制文件包含字节码和启动器
- 现在已中断(2014年2月) - 2006年上次更改
- 编译为C ++
- 现在已中止(2014年2月) - 2003年上次更改
I know that PHP is compiled to byte code before it is run on the server, and then that byte code can be cached so that the whole script doesn't have to be re-interpreted with every web access.
But can you "compile" php and upload a binary-ish file, which will just be run by the byte code interpreter?
After this question was asked, Facebook launched HipHop for PHP which is probably the best-tested PHP compiler to date (seeing as it ran one of the world’s 10 biggest websites). However, Facebook discontinued it in favour of HHVM, which is a virtual machine, not a compiler.
Beyond that, googling PHP compiler
turns up a number of 3rd party solutions.
- compiles to native binaries
- not very active now (February 2014) – last version in 2011, last change in summer 2013
- GitHub, GitHub of a rewrite
- free, open source implementation of PHP with compiler
- compiles to native binaries (Windows, Linux)
- discontinued since 2010 till contributors found – website down, stays on GitHub where last change is from early 2012
- PECL extension of PHP
- experimental
- compiles to PHP bytecode, but can wrap it in Windows binary that loads PHP interpreter (see
bcompiler_write_exe_footer()
manual) - looks discontinued now (February 2014) – last change in 2011
- Wikipedia, IBM
- incubator of changes for WebSphere sMash
- supported by IBM
- compiles to Java bytecode
- looks discontinued now (February 2014) – website down, looks like big hype in 2008 and 2009
- compiles to stand-alone Windows binaries
- the binaries contain bytecode and a launcher
- looks discontinued now (February 2014) – last change in 2006
- compiles to C++
- looks discontinued now (February 2014) – last change in 2003
这篇关于你可以“编译” PHP代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!