Methods |
public
static
|
fromComponents(int $major, int $minor): self
Create a PhpVersion object from major and minor version components.
Create a PhpVersion object from major and minor version components.
|
#
|
public
static
|
getNewestSupported(): self
Get the newest PHP version supported by this library. Support for this version may be partial,
if it is still under…
Get the newest PHP version supported by this library. Support for this version may be partial,
if it is still under development.
|
#
|
public
static
|
getHostVersion(): self
Get the host PHP version, that is the PHP version we're currently running on.
Get the host PHP version, that is the PHP version we're currently running on.
|
#
|
public
static
|
fromString(string $version): self
Parse the version from a string like "8.1".
Parse the version from a string like "8.1".
|
#
|
public
|
equals(PhpVersion $other): bool
Check whether two versions are the same.
Check whether two versions are the same.
|
#
|
public
|
newerOrEqual(PhpVersion $other): bool
Check whether this version is greater than or equal to the argument.
Check whether this version is greater than or equal to the argument.
|
#
|
public
|
older(PhpVersion $other): bool
Check whether this version is older than the argument.
Check whether this version is older than the argument.
|
#
|
public
|
isHostVersion(): bool
Check whether this is the host PHP version.
Check whether this is the host PHP version.
|
#
|
public
|
supportsBuiltinType(string $type): bool
Check whether this PHP version supports the given builtin type. Type name must be lowercase.
Check whether this PHP version supports the given builtin type. Type name must be lowercase.
|
#
|
public
|
supportsShortArraySyntax(): bool
Whether this version supports [] array literals.
Whether this version supports [] array literals.
|
#
|
public
|
supportsShortArrayDestructuring(): bool
Whether this version supports [] for destructuring.
Whether this version supports [] for destructuring.
|
#
|
public
|
supportsFlexibleHeredoc(): bool
Whether this version supports flexible heredoc/nowdoc.
Whether this version supports flexible heredoc/nowdoc.
|
#
|
public
|
supportsTrailingCommaInParamList(): bool
Whether this version supports trailing commas in parameter lists.
Whether this version supports trailing commas in parameter lists.
|
#
|
public
|
allowsAssignNewByReference(): bool
Whether this version allows "$var =& new Obj".
Whether this version allows "$var =& new Obj".
|
#
|
public
|
allowsInvalidOctals(): bool
Whether this version allows invalid octals like "08".
Whether this version allows invalid octals like "08".
|
#
|
public
|
allowsDelInIdentifiers(): bool
Whether this version allows DEL (\x7f) to occur in identifiers.
Whether this version allows DEL (\x7f) to occur in identifiers.
|
#
|
public
|
supportsYieldWithoutParentheses(): bool
Whether this version supports yield in expression context without parentheses.
Whether this version supports yield in expression context without parentheses.
|
#
|
public
|
supportsUnicodeEscapes(): bool
Whether this version supports unicode escape sequences in strings.
Whether this version supports unicode escape sequences in strings.
|
#
|