PHP-Backporter

Converts PHP 5.3 code to PHP 5.2 code

  • 所有者: nikic/PHP-Backporter
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

PHP Backporter

Currently supported

  • const statements (converted into define function calls)
  • __DIR__ magic constant (converted into dirname(__FILE__))
  • Lambda functions (converted into normal functions)
  • Closures (converted into classes)
  • Namespaces (converted into underscore-separated pseudo namespaces)

Limitations

Closures

Closures are represented by a callable array, so calls of type $function() will be transformed
into call_user_func(_array) calls. This can be a problem is functions expect arguments by reference.

Namespaces

The current namespaces implementation is very limited. Most notably it assumes all unqualified uses
of constants and functions are global if a global constant with such a name is defined and local if
it is not. Additionally many dynamic constructs do not work yet.

ToDo

  • Dynamic scope resolution ($className::)
  • Short ternary operator
  • Late static binding (?)
  • __callStatic magic (?)
  • __invoke magic (?)
  • goto (?)
  • ...

主要指标

概览
名称与所有者nikic/PHP-Backporter
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证
所有者活动
创建于2011-08-05 13:34:46
推送于2011-09-04 09:34:24
最后一次提交2011-09-04 11:32:54
发布数0
用户参与
星数22
关注者数2
派生数5
提交数16
已启用问题?
问题数0
打开的问题数0
拉请求数0
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?