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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?