华为防火墙cli控制台_控制台大战-PHP CLI库

本文对比了三个PHP命令行界面库:Symfony console, Hoa console和Webmozart console。文章介绍了它们的起源、依赖性、复杂度以及实际应用案例。Symfony console是最流行且功能丰富的,Hoa console注重终端环境操作,而Webmozart console则适用于大型项目。" 112957113,10535532,CentOS云服务器Python3安装全记录,"['centos服务器安装python3', 'Linux', 'Python', '系统管理']
摘要由CSDN通过智能技术生成

华为防火墙cli控制台

I have always been a big fan of console commands and I try to provide a command line interface (CLI) as much as possible in most of my PHP projects.

我一直是控制台命令的忠实拥护者,并且我尝试在大多数PHP项目中尽可能提供命令行界面(CLI)。

In this article, I’ll briefly compare three PHP console command libraries:

在本文中,我将简要比较三个PHP控制台命令库:

Image of terminal screen

起源故事 (Origin Stories)

The Symfony console is the oldest and the most popular one, used in many projects (and obviously part of the Symfony framework). With dozens of contributors, it became the first choice for many developers.

Symfony控制台是最古老和最受欢迎的控制台 ,在许多项目中使用(显然是Symfony框架的一部分)。 拥有数十名贡献者,它已成为许多开发人员的首选。

Hoa is a modular, extensible and structured set of PHP libraries that includes the Hoa console. It aims to be a bridge between industrial and research worlds, and this makes that project quite interesting.

Hoa是一组模块化,可扩展和结构化PHP库,其中包括Hoa控制台 。 它旨在成为工业界和研究界之间的桥梁,这使该项目非常有趣。

The Webmozart console is the newest project, wants to be easier, test friendly and add new functionality on top of the Symfony console.

Webmozart控制台是最新的项目,希望更简单,易于测试并在Symfony控制台之上添加新功能。

依赖关系,大小和复杂性 (Dependencies, Size, and Complexity)

The Symfony console has only suggested dependencies, as opposed to the Hoa console library that depends on some Hoa project libraries. The Webmozart project, too, directly depends on the Symfony console.

Symfony控制台仅建议了依赖项,而不是依赖于某些Hoa项目库的Hoa控制台库。 Webmozart项目也直接取决于Symfony控制台。

The Hoa console has the smallest number of LOC (Logical Lines of Code) ~1397, followed by the Symfony console ~2226 and the Webmozart ~3126 (without dependencies).

Hoa控制台的LOC (逻辑代码行)数量最少,〜1397,其次是Symfony控制台〜2226和Webmozart 〜3126(无依赖项)。

In order to have a rough indicator of the complexity of these projects, below is some data from their PHPLOC analysis*:

为了粗略地说明这些项目的复杂性,以下是来自其PHPLOC分析的一些数据*:



Description Symfony Hoa Webmozart
Cyclomatic Complexity
Average Complexity per LLOC 0.37 0.36 0.26
Average Complexity per Class 14.73 25.14 8.84
Average Complexity per Method 2.55 3.38 1.99
Dependencies
Global Accesses 3 20 1
Attribute Accesses 807 217 1285
Method Calls 1103 324 1320
<
描述 Symfony a Webmozart
圈复杂度
每个LLOC的平均复杂度 0.37 0.36 0.26
每班平均复杂度 14.73 25.14 8.84
每种方法的平均复杂度 2.55 3.38 1.99
依存关系
全局访问 3 20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值