Php访问数据库有重传,PHPor 的Blog

Zephir是一种专门用于开发PHP扩展的语言,它不替代PHP或C,而是作为两者之间的补充。Zephir的代码以类的形式组织,并且需要在命名空间内。它的注释不仅是文档,还会被编译到生成的代码中。尽管Zephir编译成字节码在Zend引擎上运行,但也可进一步编译为机器码,以提升应用性能。
摘要由CSDN通过智能技术生成

zephir是为开发PHP扩展而发明的一门语言,而且只能用来开发PHP扩展,通常,PHP的扩展都是编译运行的,但是zephir却是把自己编译成字节码给zend解释执行的,但是他也能进一步编译成机器语言

Zephir was not created to replace PHP or C. Instead, we think it is a complement to them, allowing PHP developers to venture into code compilation and static typing. Zephir is an attempt to join good things from the C and PHP worlds, looking for opportunities to make applications faster.

只能写带名字空间的class

Code in Zephir must be placed in classes. The language is intended to create object-oriented libraries/frameworks, so code outside of a class is not allowed. Additionally, a namespace is required:

他可以直接调用PHP语言定义的函数

必须写注释:

In most languages, comments are simply text ignored by the compiler/interpreter. In Zephir, multi-line comments are also used as docblocks, and they’re exported to the generated code, so they’re part of the language!

If a docblock is not located where it is expected, the compiler will throw an exception.

zephir相当于是跑在zend上的另一门语言

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值