​​​​ php命令行工具 | 苏生不惑的博客

php命令行工具

composer镜像

composer全局安装的命令路径 C:\Users\xxx\AppData\Roaming\Composer\vendor\bin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
composer global require slince/composer-registry-manager
$ composer repo:ls
composer https://packagist.org
phpcomposer https://packagist.phpcomposer.com
composer-proxy https://packagist.composer-proxy.org
* laravel-china https://packagist.laravel-china.org
cnpkg https://php.cnpkg.org
composer repo:use laravel-china
composer require 安装的时候可能会把.git目录也下载了,因为木有php-zip扩展,所以使用的git clone 来下载,默认是wget

要列出所有已安装的包及其版本号和说明,只需使用 show:

composer show
有时候把这些信息用依赖关系树的形式查看会更容易理解, 可以通过 --tree or -t 参数:

composer show -t
如果要筛选返回的包,可以使用通配符传递一个额外的字符串参数 *:
composer show -t
acacha/admin-lte-template-laravel 1.0.5 AdminLTE template applied to Laravel Scaffolding
├──illuminate/console ~5.0
├──illuminate/support ~5.0
└──php >=5.4.0
baum/baum 1.1.1 Baum is an implementation of the Nested Set pattern for Eloquent models.
├──illuminate/console 5.*
├──illuminate/database 5.*
├──illuminate/events 5.*
├──illuminate/filesystem 5.*
├──illuminate/support 5.*
└──php >=5.4.0
cloudmario/scs dev-master PHP SDK for 新浪云存储
└──php >=5.2.0
firephp/firephp-core v0.4.0 Traditional FirePHPCore library for sending PHP variables to the browser.
guzzlehttp/guzzle 5.3.1 Guzzle is a PHP HTTP client library and framework for building RESTful web service clients
├──guzzlehttp/ringphp ^1.1
│ ├──guzzlehttp/streams ~3.0
│ │ └──php >=5.4.0
│ ├──php >=5.4.0
│ └──react/promise ~2.0
│ └──php >=5.4.0
└──php >=5.4.0
jenssegers/mongodb v2.1.9 A MongoDB based Eloquent model and Query builder for Laravel 4
├──illuminate/container ^5.0
├──illuminate/database ^5.0
├──illuminate/events ^5.0
├──illuminate/support ^5.0
└──php >=5.4.0


composer show 'symfony/*'
如果要查看有关特定包的信息,需要完整包名:

$ composer show laravel/framework
name : laravel/framework
descrip. : The Laravel Framework.
keywords : framework, laravel
versions : * v5.0.16
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/laravel/framework.git 861a1e78c84dca82fe4bd85d00349c52304eea77
dist : [zip] https://api.github.com/repos/laravel/framework/zipball/861a1e78c84dca82fe4bd85d00349c52304eea77 861a1e78c84dca82fe4bd85d00349c52304eea77


如果您想知道安装特定软件包的原因,可以使用 why 命令来确定哪些依赖项需要它:

composer why vlucas/phpdotenv
composer why vlucas/phpdotenv -t

使用 --verbose 或 -v 参数来查看本地修改的软件包和文件:

composer status -v

$ composer licenses
Name: laravel/laravel
Version: dev-dev_wzp
Licenses: MIT
Dependencies:

Name Version License
acacha/admin-lte-template-laravel 1.0.5 MIT
bacon/bacon-qr-code 1.0.1 BSD-2-Clause
baum/baum 1.1.1 MIT
classpreloader/classpreloader 1.2.0 MIT
cloudmario/scs dev-master 5294387 MIT

检测一下已安装的包,哪些有可以升级的。这可以使用 outdated 命令。

composer outdated
acacha/admin-lte-template-laravel 1.0.5 6.0
bacon/bacon-qr-code 1.0.1 2.0.0
classpreloader/classpreloader 1.2.0 3.2.0
cloudmario/scs dev-master 5294387 dev-master 4610269
danielstjules/stringy 1.9.0 3.1.0
doctrine/inflector v1.0.1 v1.3.0
doctrine/instantiator 1.0.5 1.2.0
evenement/evenement v2.0.0 v3.0.1
guzzlehttp/guzzle 5.3.1 6.3.3
guzzlehttp/psr7 1.3.1 1.5.2

Laravel 最近发布了一个新的 5.8 版本的框架;我们可以使用 why-not 命令检查任何阻止我们更新 laravel/framework 包的包:

composer why-not laravel/framework 5.8

如果您想知道安装特定软件包的原因,可以使用 why 命令来确定哪些依赖项需要它:

composer why vlucas/phpdotenv
laravel/framework v5.0.16 requires vlucas/phpdotenv (~1.0)
https://learnku.com/laravel/t/28678

多线程下载composer

1
2
3
4
国内源搭配多线程下载composer
composer global require hirak/prestissimo
composer create-project laravel/laravel laravel1 --no-progress --profile --prefer-dist
https://github.com/hirak/prestissimo

httpstat

1
2
3
4
5
6
7
$ git clone https://github.com/talhasch/php-httpstat
$ cd php-httpstat
$ cp httpstat.php /usr/local/bin/httpstat
$ chmod +x /usr/local/bin/httpstat


$ httpstat http://www.google.com

PHP 静态代码分析phan

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
https://laravel-china.org/topics/19011 https://github.com/nunomaduro/larastan https://laravel-china.org/topics/20768

git clone https://github.com/nikic/php-ast
cd php-ast/
phpize
sudo ./configure --with-php-config=/php7/bin/php-config --enable-ast
sudo make
sudo make install
php7 --ini
vi /etc/php.ini
extension = ast.so
# 就能看到扩展啦
php -m | grep ast
curl -sS https://getcomposer.org/installer | php7
mkdir test
cd test
which php
$ composer config -g repo.packagist composer https://packagist.laravel-china.org

php7 /usr/bin/composer require --dev "phan/phan:1.x"
vi src/a.php

<?php

class A extends B
{
public function a1()
{
return $this->a2(1);
}

/**
* @param array $b
*
* @return int
*/
private function a2($b)
{
return $b + 1;
}
}
写个shell脚本 vi test.sh

#!/bin/bash

function log()
{
echo -e -n "\033[01;35m[YUNQI] \033[01;31m"
echo $@
echo -e -n "\033[00m"
}

Color_Text()
{
echo -e " \e[0;$2m$1\e[0m"
}

Echo_Red()
{
echo $(Color_Text "$1" "31")
}

Echo_Green()
{
echo $(Color_Text "$1" "32")
}

Echo_Yellow()
{
echo $(Color_Text "$1" "33")
}

: > file.list

for file in $(ls src/*)
do
echo $file >> file.list
done

Echo_Green "file list:\n"
Echo_Green "========================\n"

cat file.list

Echo_Green "========================\n"


Echo_Yellow "Phan run\n"
Echo_Yellow "========================\n"

./vendor/bin/phan -f file.list -o res.out

Echo_Yellow "========================\n"

Echo_Red "error log\n"
Echo_Red "========================\n"

cat res.out

Echo_Red "========================\n"
#https://mengkang.net/1356.html
[root@localhost ast]# sh test.sh
file list:
========================
src/a.php
========================
Phan run
========================
PHP Warning: Unsupported declare 'strict_types' in /ast/vendor/phan/phan/src/phan.php on line 1
PHP Parse error: syntax error, unexpected T_FUNCTION, expecting T_PAAMAYIM_NEKUDOTAYIM in /ast/vendor/phan/phan/src/phan.php on line 29
========================
error log
========================
cat: res.out: No such file or directory
========================


[root@localhost ast]# vi vendor/bin/phan
#!/usr/bin/env php7
<?php require_once __DIR__ . '/src/phan.php';
# 安装
composer require --dev nunomaduro/larastan

# 分析代码
php artisan code:analyse
而 code:analyse 命令有些参数可以帮助你自定义分析过程。

# 默认为 5。0 表示最宽松,7 表示最严格。
php artisan code:analyse --level=[0-7]

# 分析指定的路径。
php artisan code:analyse --paths="modules,app,domain"
安装的时候如果出现提示 Your requirements could not be resolved to an installable set of packages.
改用以下的命令安装
先执行 composer update
再执行 composer require nunomaduro/larastan --update-with-all-dependencies

phpcs

命令行音乐搜索下载器

1
2
3
$ composer global require guanguans/music-php
$ ./path/music-php
https://github.com/guanguans/music-php

phpmd

语法检测

1
2
3
composer require overtrue/phplint --dev -vvv
$ ./vendor/bin/phplint ./ --exclude=vendor
$ ./vendor/bin/phplint

psysh

管理缓存

1
2
3
4
5
6
https://learnku.com/articles/26314
$ curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar

$ chmod +x cachetool.phar

$ php cachetool.phar opcache:reset --fcgi

php7cc语法检测

1
2
3
4
5
6
//https://github.com/sstalle/php7cc/releases
composer global require sstalle/php7cc
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
php7cc /path/to/my/file.php
php7cc /path/to/my/directory/
php7cc --level=error /path/to/my/directory/ > error.txt

内网穿透spike

1
2
3
composer global require slince/spike
$ spiked --address=127.0.0.1:8088
https://github.com/slince/spike/blob/master/README-zh_CN.md

phpcbf

加速composer开启多线程安装下载

1
2
3
$ composer global require hirak/prestissimo
$ composer global remove hirak/prestissimo
$ composer create-project laravel/laravel laravel1 --no-progress --profile --prefer-dist

包构建工具package-builder

1
2
3
4
5
6
7
8
9
10
11
12
13
//
安装工具

$ composer global require 'overtrue/package-builder' --prefer-source
创建项目

$ package-builder build [目标目录]
$ package-builder build ./weather
# 然后按提示操作即可
# 包名:xkeyi/weather
# 命名空间:Xkeyi\Weather
# 描述:A weather SDK
接下来我们需要在 composer.json 中声明包自动加载的命名空间,进入项目目录,执行命令:composer dump-autoload

pecl

1
2
3
4
pecl install swoole 默认是按照最新版的,如果有你的环境php不是最新,那需要按照PHP版本去安装
安装PHP是7.1版本的swoole
pecl -d php_suffix=7.1 install swoole-1.9.23
pecl channel-update pecl.php.net

经纬度行政区域查询

1
2
3

curl "http://116.196.105.215:1234/gis?auth_user=freevip&latitude=39.880655&longitude=116.354386"
{"error":0,"msg":"成功","data":{"country":"CHN","en0":"","en1":"","en2":"","en3":"","zh0":"中国","zh1":"北京市","zh2":"","zh3":"西城区"}}

格式化 SQL

1
2
3
4
5
6
7
composer global require jdorn/sql-formatter

sql-formatter "SELECT SOME QUERY;" // 直接格式化

// 或

echo "SELECT SOME QUERY;" | sql-formatter // 使用管道,更适合较大量的 SQL 语句

将 PHP 应用快速打包为 PHAR

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
composer require humbug/box
vendor/bin/box compile
[root@VM_0_14_centos blog]# vendor/bin/box compile

____
/ __ )____ _ __
/ __ / __ \| |/_/
/ /_/ / /_/ /> <
/_____/\____/_/|_|


Box version 3.4.0@4eeb285


// Loading without a configuration file.


In Assertion.php line 2550:

File "/usr/share/nginx/html/blog/index.php" was expected to exist.


compile [-c|--config CONFIG] [--debug] [--no-parallel] [--no-restart] [--dev] [--no-config] [--with-docker] [-d|--working-dir WORKING-DIR]


[ERROR] The configuration file is invalid.
[root@VM_0_14_centos blog]# touch index.php
[root@VM_0_14_centos blog]# vendor/bin/box compile

____
/ __ )____ _ __
/ __ / __ \| |/_/
/ /_/ / /_/ /> <
/_____/\____/_/|_|


Box version 3.4.0@4eeb285


// Loading without a configuration file.

🔨 Building the PHAR "/usr/share/nginx/html/blog/index.phar"

? No compactor to register
? Adding main file: /usr/share/nginx/html/blog/index.php
? Adding requirements checker
? Adding binary files
> No file found
? Auto-discover files? Yes
? Adding files
> 4828 file(s)
? Generating new stub
- Using shebang line: #!/usr/bin/env php
- Using banner:
> Generated by Humbug Box 3.4.0@4eeb285.
>
> @link https://github.com/humbug/box
? Dumping the Composer autoloader
? Removing the Composer dump artefacts
? No compression
? Setting file permissions to 0755
* Done.

No recommendation found.
No warning found.

// PHAR: 4865 files (24.51MB)
// You can inspect the generated PHAR with the "info" command.

// Memory usage: 83.76MB (peak: 85.63MB), time: 109.71s

phptrace

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
wget https://github.com/Qihoo360/phptrace/archive/v1.0.1-beta.tar.gz
tar -zxvf v1.0.1-beta.tar.gz
cd phptrace-1.0.1-beta/extension
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install-all
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/
Installing PHP Trace binary: /usr/local/php/bin/
[root@VM_0_14_centos extension]# php --ini
Configuration File (php.ini) Path: /usr/local/php/lib
Loaded Configuration File: /usr/local/php/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
vi /usr/local/php/lib/php.ini
extension = trace.so
/usr/local/php/bin/phptrace -p 19248

gdb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
for ($i = 0; $i < 3; $i ++) {
echo $i . PHP_EOL;
if ($i == 2) {
$j = $i + 1;
var_dump($j);
}
sleep(1);
}
gdb php
(gdb)run index.php
...
0
1
2
int(3)
[Inferior 1 (process 577) exited normally]

curl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl -x 123.45.67.89:1080 -o page.html http://www.yahoo.com 使用代理访问
添加 --data 或 -D 后面跟传递的参数,再加网址,即可发送POST请求

curl -D "name=jack&age=22" 127.0.0.1:8899/post
如果要对数据内容做编码处理,可使用 –data-urlencode 参数

curl -D "name=jack jason&age=22" 127.0.0.1:8899/post
curl --e http://www.example.com http://www.example.com
用curl通过dict协议去查字典
curl dict://dict.org/d:computer
ftp下载上传
curl -u name:passwd ftp://ip:port/path/file

curl -T localfile -u name:passwd ftp://upload_site:port/path/

代码检查工具

1
2
3
4
5
6
7
8
composer require --dev bamarni/composer-bin-plugin

composer require nunomaduro/phpinsights
# Mac & Linux
./vendor/bin/phpinsights

# Windows
.\vendor\bin\phpinsights.bat

格式化并高亮 SQL 语句

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
composer global require jdorn/sql-formatter

sql-formatter "SELECT SOME QUERY;" // 直接格式化

// 或

echo "SELECT SOME QUERY;" | sql-formatter // 使用管道,更适合较大量的 SQL 语句
<?php
require_once('SqlFormatter.php');

$query = "SELECT count(*),`Column1`,`Testing`, `Testing Three` FROM `Table1`
WHERE Column1 = 'testing' AND ( (`Column2` = `Column3` OR Column4 >= NOW()) )
GROUP BY Column1 ORDER BY Column3 DESC LIMIT 5,10";

echo SqlFormatter::format($query);
echo SqlFormatter::format($query, false);

https://wi1dcard.cn/posts/format-sql-statements-in-php/

命令行翻译器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
全局安装

$ composer global require jonasyeah/client-translator
1/11: https://packagist.laravel-china.org/p/provider-archived$2edb7b4fbca3e9f5a61bfdda69582a5e3843b748dd030acf2ec34104f65c6d17.json
2/11: https://packagist.laravel-china.org/p/provider-2013$09a8bafcb621ca7068e4068038ea0cccc1f8be98ec5c91bdcfe8fcc4261cbc95.json
3/11: https://packagist.laravel-china.org/p/provider-2014$0a5ce8b24ddb8417ea7288cb02cf77a82ca7f2f4103fff9065cbe8d22747bad0.json
4/11: https://packagist.laravel-china.org/p/provider-2019-01$a8369df8eeb94ae1e149a7ed59354b065e6eb83af6f3b2ee29cc9d09035a969f.json
5/11: https://packagist.laravel-china.org/p/provider-latest$7f7119f65482d6cbae99422a9801b81a24b7b884e2d8254b2372c51f2af27ae2.json
6/11: https://packagist.laravel-china.org/p/provider-2019-04$c8b07c6782c00960fd236b08f48725c5c63c02a34cc0d60144badfcc9789dc6b.json
7/11: https://packagist.laravel-china.org/p/provider-2018-10$0da5af3cd329f65ef465075887d27aa728a28f442dec760d1af99aacf149716a.json
8/11: https://packagist.laravel-china.org/p/provider-2015$adc4766494fc221443b709dd44d317db9120916304aa4735f2b90702aa2a9e1f.json
9/11: https://packagist.laravel-china.org/p/provider-2017$7f82673b6f8e5f027fba0ad586d772ed67d614dd3273c3989a09ec53dea9b04d.json
10/11: https://packagist.laravel-china.org/p/provider-2016$3df5b457dc3441e50b8f9c6d69a85e1eaefd2cc0627a60c8059bc8e060a19b5c.json
11/11: https://packagist.laravel-china.org/p/provider-2018$911c1fd07a11e2ab44e3423d541ce06e7b9df93c3ebbd5adee02fb9a696c0357.json
Finished: success: 11, skipped: 0, failure: 0, total: 11
Using version ^1.0 for jonasyeah/client-translator
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
1/2: https://dl.laravel-china.org/jonasyeah/translator/c653dd16f8a57c5d9d0cb8d782277b336623b9e3.zip
2/2: https://dl.laravel-china.org/jonasyeah/client-translator/1d4e897bbcf8cd8895ef1252bc7fe7f35287c0a5.zip
Finished: success: 2, skipped: 0, failure: 0, total: 2
Package operations: 2 installs, 0 updates, 0 removals
- Installing jonasyeah/translator (v1.0.0): Loading from cache
- Installing jonasyeah/client-translator (v1.0.1): Loading from cache
Writing lock file
Generating autoload files


$ tsl -h

______ ____ ____ ____ _____ _ ____ ______ ___ ____
| || \ / || \ / ___/| | / || | / \ | \
| || D )| o || _ ( \_ | | | o || || || D )
|_| |_|| / | || | |\__ || |___ | ||_| |_|| O || /
| | | \ | _ || | |/ \ || || _ | | | | || \
| | | . \| | || | |\ || || | | | | | || . \
|__| |__|\_||__|__||__|__| \___||_____||__|__| |__| \___/ |__|\_|


php ./tsl 'to translate statment' -f baidu,youdao


$ tsl 爱
Translated Successfully
来源: youdao
长句翻译: love
单词翻译: love,like,affection

当前目录安装

$ composer create-project jonasrepo/client-translator
使用

$ ./path/client-translator/tsl "今天天气不错"
$ ./path/client-translator/tsl "今天天气不错" -f youdao,baidu

which tsl
/c/Users/xxx/AppData/Roaming/Composer/vendor/bin/tsl
cat tsl
#!/usr/bin/env sh

dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../jonasyeah/client-translator" && pwd)

if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
# We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi

"${dir}/tsl" "$@"

https://learnku.com/articles/30640

镜像

1
2
3
4
5
6
腾讯   https://mirrors.cloud.tencent.com/composer/
composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/
华为https://mirrors.huaweicloud.com/
阿里云 https://mirrors.aliyun.com/composer/index.html
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -g --unset repos.packagist

一键生成 Composer/PHP/ThinkPHP/Laravel 扩展包

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
composer g require huangdijia/composer-package-builder
composer build:composer-plugin
composer build:laravel-package
composer build:php-package
composer build:thinkphp-package
[root@VM_0_11_centos xunsearch-full]# composer build:composer-plugin
Do not run Composer as root/super user! See https://getcomposer.org/root for details



[OK] Build [my-package] success
[root@VM_0_11_centos xunsearch-full]# ll my-package/
total 32
-rw-r--r-- 1 root root 123 Dec 6 20:02 CHANGELOG.md
-rw-r--r-- 1 root root 1030 Dec 6 20:02 composer.json
-rw-r--r-- 1 root root 2972 Dec 6 20:02 CONTRIBUTING.md
-rw-r--r-- 1 root root 1057 Dec 6 20:02 LICENSE.md
-rw-r--r-- 1 root root 1039 Dec 6 20:02 phpunit.xml.dist
-rw-r--r-- 1 root root 1697 Dec 6 20:02 README.md
drwxr-xr-x 3 root root 4096 Dec 6 20:02 src
drwxr-xr-x 2 root root 4096 Dec 6 20:02 tests

图片转字符

1
2
3
4
5
6
7
8
9
10
11
12
13
composer require aizuyan/img2ascii
bin/img2ascii abm.jpg -x 10 -y 20
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::rrii: s:::::::::::::::::::::::
:::::::::::::::::::::::::::iisMN8B99r:::::::::::::::::::::::
:::::::::::::::::::::::::: iq0B8M0000r::::::::::::::::::::::
::::::::::::::::::::::::: @B8B09BB0@0B :::::::::::::::::::::
:::::::::::::::::::::::::r@BBNB08880B0v:::::::::::::::::::::
:::::::::::::::::::::::ir000B8NB888@B@Noi:::::::::::::::::::
::::::::::::::::::::::i00000BB8@B@@808BBsni:::::::::::::::::
:::::::::::::::::::::: 0B@B00no7vr7ii7rntipi:::::::::::::::

https://www.cnblogs.com/iforever/p/6132609.html

PHP抖音机器人

php 中使用 strace、gdb、tcpdump 调试工具

PHP 中格式化并高亮 SQL 语句

为什么 (int) 快于 intval?

将 PHP 应用快速打包为 PHAR

PHP 7的新特性

MAC之http命令行工具curl

PHP实现订单的延时处理

30-seconds-of-php-code

composer图标

用PHP玩转进程之二 — 多进程PHPServer