杂七杂八的

有一些常用的表达式的对应元代码如下表

类型 代码 元代码
注释
//注释
array(
    'type'=>'comment',
    'value'=>'注释'
)
注释段
/*
注释第一行
注释第二行
*/
array(
    'type'=>'comments',
    'value'=>'
注释第一行
注释第二行
'
)

 

退出 
exit;

exit(200)

array(
    'type'=>'exit',
)
array(
    'type'=>'exit',
    'property'=>array(
        array('type'=>'int' , 'data'=>200)
    )
)

 try

catch

 
try{
}catch($e){
}
 
array(
    'type'=>'try',
    'child'=>array(
        //存放try区间内的表达式
    ),
    'catch'=>array(
        'type'=>'variable',
        'name'=>'$e'
    )
    'catchChild'=>array(
        //存放catch区间内的表达式
    )
)
 throw  
throw new Exception("错误信息");
 
array(
    'type'=>'throw',
    'value'=>array(
        'type'=>'new',
        'name'=>'Exception',
        'property'=>array(
            array(
                'type'=>'string',
                'data'=>'错误信息'
            )
        )
    )
)
include_once 

 include_once($path);

这种方式格式等同于函数调用functionCall的格式

include_onde $path;

这种的元代码格式如右侧

array(
    'type'=>'include_once',
    'value'=>array(
        'type'=>'variable',
        'name'=>'$path'
    )
)
 null  null
array(
    'type'=>'null'
)
 __FILE__  __FILE__
array(
    'type'=>'__FILE__'
)
 php结束符 ?> 
array(
    'type'=>'phpEnd'
)

 

目录

引擎介绍

元代码结构

metaPHP数组的使用

函数的使用

类的定义和使用

杂七杂八的

修改已有代码

 

也欢迎进行QQ联系本人 ,交流我在开发metaPHP过程中的经验

QQ:309568486

posted @ 2017-09-22 15:17  浩然哥哥v5  阅读(117)  评论(0编辑  收藏  举报