Chinaunix首页 | 论坛 | 博客
  • 博客访问: 213731
  • 博文数量: 42
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 420
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-09 10:55
个人简介

每天改变一点点,生活充满了惊喜。

文章分类

全部博文(42)

文章存档

2016年(8)

2015年(29)

2014年(5)

我的朋友

分类: PHP

2016-04-20 14:11:57

介绍
PHP-Parser是一款PHP源代码分析器,可以将PHP源代码解析为抽象语法树(AST)。
项目主页是。

安装
git --clone .git
进入 源代码目录 PHP-Parser,
通过PHP包管理器composer.phar来安装(PHP版本5.6以上
$php composer.phar require

安装过程中可能会报一下错误:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE Composer

下载时,使用的证书不对,解决办法:
curl https://curl.haxx.se/ca/cacert.pem -o cacert.pem

配置php.ini文件,增加:
[openssl]
openssl.cafile=xxx/cacert.pem

用法
$php bin/php-parse test.php

阅读(7631) | 评论(0) | 转发(0) |
0

上一篇:Algorithm:解析字符串逻辑表达式

下一篇:没有了

给主人留下些什么吧!~~