【文件属性】:
文件名称:compiler:将将来PHP编译为今天PHP
文件大小:91KB
文件格式:ZIP
更新时间:2021-03-13 23:49:30
language php compiler php7 arrow-functions
XP编译器
将将来PHP编译为今天PHP。
用法
通过composer require xp-framework/compiler将编译器添加到项目后, composer require xp-framework/compiler在自动加载过程中将composer require xp-framework/compiler类通过编译器传递。 以.class.php结尾的文件内的代码被视为已编译; 文件需要重命名为T.class.php => T.php才能被拾取。
例子
以下代码使用Hack语言,PHP 8.1、8.0,PHP 7.4,PHP 7.3,PHP 7.2,PHP 7.1和PHP 7.0功能,但可以在任何大于等于PHP 7.0的程序上运行。 如有必要,可以将来自较新PHP版本的内置功能转换为与当前正在执行的运行时一起使用。
<?php // In a file "HelloW