reb / babel
PHP Babel
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/reb/babel
Requires
- php: >=7.0.0
- ext-v8js: >=1.3.3
This package is not auto-updated.
Last update: 2025-10-03 12:24:22 UTC
README
It's simple Babel Transpiler for PHP.
PHP Code:
$Babel = new \Babel\Transpiler\Core();
echo $Babel->execute("class REBUS {}");
Result:
"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);
};