reb / babel
PHP Babel
v1.0.0
2018-02-28 11:03 UTC
Requires
- php: >=7.0.0
- ext-v8js: >=1.3.3
This package is not auto-updated.
Last update: 2024-09-20 07:36:54 UTC
README
这是一个简单的PHP Babel转换器。
PHP 代码
$Babel = new \Babel\Transpiler\Core();
echo $Babel->execute("class REBUS {}");
结果
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var REBUS = function REBUS() {
_classCallCheck(this, REBUS);
};