composer 版本号中的 ^ circumflex accent/脱字号/扬抑符 是什么意思?

WBOY
Release: 2016-06-06 20:29:01
Original
3125 people have browsed it

在使用 composer mailgun 的时候遇到的
"mailgun/mailgun-php": "^1.8"

以前遇到过 ^ 这个符号, 但都没深究. 现在通过搜索找不到答案.

这里(http://docs.phpcomposer.com/01-basic-usage.html)说了 ~ 的作用, 但是没讲 ^.

找到 ^ 的几种叫法:

  • circumflex accent

  • 脱字号

  • 扬抑符(在维基百科之外的一些地方也统称为抑扬符)

但不知道这个符号的作用. 尤其是在软件版本号上的作用.

请教.

回复内容:

在使用 composer mailgun 的时候遇到的
"mailgun/mailgun-php": "^1.8"

以前遇到过 ^ 这个符号, 但都没深究. 现在通过搜索找不到答案.

这里(http://docs.phpcomposer.com/01-basic-usage.html)说了 ~ 的作用, 但是没讲 ^.

找到 ^ 的几种叫法:

  • circumflex accent

  • 脱字号

  • 扬抑符(在维基百科之外的一些地方也统称为抑扬符)

但不知道这个符号的作用. 尤其是在软件版本号上的作用.

请教.

是控制版本用的
详细解释如下:
https://getcomposer.org/doc/articles/versions.md#caret
例子:
^1.2.3 表示 >=1.2.3 ^0.3 表示 >=0.3.0

首先猜测是跟正则的符号一样,表示match beginning of 1.8

具体我来找找。。。猜测错误

======================请看楼下=============================

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!