PHP – Take advantage of language constructs

  • F astest things in PHP are the language constructs .
  • They are highly optimized in the interpreter
  • Don’t require calling external libraries
  • Don’t call a function if there is a language construct. As an example, using a casting operator like (int) $total is much more efficient than using the function intval($foo)
  • Function calling generate considerably amount of overhead. Using a language construct avoid
  • isset() and unset() are both language constructs , even though they mostly act like functions. However calling them does not generate the function overhead.

Some common language constructs are:

  1. echo()
  2. empty()
  3. isset()
  4. unset()
  5. eval()
  6. exit()
  7. die()
  8. include()
  9. include_once()
  10. require()
  11. require_once()
  12. return

http://tracehills.com/browse.php?b=5&u=Oi8vbWFobXVkYWhzYW4ud29yZHByZXNzLmNvbS8yMDA4LzA3LzAyL3BocC10YWtlLWFkdmFudGFnZS1vZi1sYW5ndWFnZS1jb25zdHJ1Y3RzLw%3D%3D

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值