version

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package version models target PHP language versions (5.3 – 8.6).

Index

Constants

This section is empty.

Variables

Releases are the supported versions, oldest first.

Functions

This section is empty.

Types

type Version

type Version uint16

Version is major*100 + minor, e.g. 803 for PHP 8.3.

const (
	PHP53 Version = 503
	PHP54 Version = 504
	PHP55 Version = 505
	PHP56 Version = 506
	PHP70 Version = 700
	PHP71 Version = 701
	PHP72 Version = 702
	PHP73 Version = 703
	PHP74 Version = 704
	PHP80 Version = 800
	PHP81 Version = 801
	PHP82 Version = 802
	PHP83 Version = 803
	PHP84 Version = 804
	PHP85 Version = 805
	PHP86 Version = 806

	Min     = PHP53
	Max     = PHP86
	Default = PHP84
)

func MustParse

func MustParse(s string) Version

MustParse is Parse that panics; for tests and constants.

func Next added in v0.2.5

func Next(v Version) (Version, bool)

Next returns the first supported release after v, false when v is the latest or later.

func Parse

func Parse(s string) (Version, error)

Parse accepts "8.3", "8.3.1", "80300" style is not supported; "" yields Default.

func (Version) AtLeast

func (v Version) AtLeast(o Version) bool

AtLeast reports whether v >= o.

func (Version) Below

func (v Version) Below(o Version) bool

Below reports whether v < o.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL