pub enum ApiVersion {
Php80 = 20_200_930,
Php81 = 20_210_902,
Php82 = 20_220_829,
Php83 = 20_230_831,
Php84 = 20_240_924,
Php85 = 20_250_925,
}Expand description
PHP API version enum.
This enum represents the supported PHP API versions and provides utilities for version detection and comparison.
Variants§
Php80 = 20_200_930
PHP 8.0
Php81 = 20_210_902
PHP 8.1
Php82 = 20_220_829
PHP 8.2
Php83 = 20_230_831
PHP 8.3
Php84 = 20_240_924
PHP 8.4
Php85 = 20_250_925
PHP 8.5
Implementations§
Source§impl ApiVersion
impl ApiVersion
Sourcepub fn supported_apis(self) -> Vec<ApiVersion>
pub fn supported_apis(self) -> Vec<ApiVersion>
Returns the API versions that are supported by this version.
For example, PHP 8.3 supports APIs from 8.0, 8.1, 8.2, and 8.3.
Sourcepub fn cfg_name(self) -> &'static str
pub fn cfg_name(self) -> &'static str
Returns the cfg flag name for this version (e.g., “php84”).
Sourcepub fn define_name(self) -> &'static str
pub fn define_name(self) -> &'static str
Returns the C preprocessor define name for this version.
Trait Implementations§
Source§impl Clone for ApiVersion
impl Clone for ApiVersion
Source§fn clone(&self) -> ApiVersion
fn clone(&self) -> ApiVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiVersion
impl Debug for ApiVersion
Source§impl Ord for ApiVersion
impl Ord for ApiVersion
Source§fn cmp(&self, other: &ApiVersion) -> Ordering
fn cmp(&self, other: &ApiVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ApiVersion
impl PartialEq for ApiVersion
Source§impl PartialOrd for ApiVersion
impl PartialOrd for ApiVersion
Source§impl TryFrom<u32> for ApiVersion
impl TryFrom<u32> for ApiVersion
impl Copy for ApiVersion
impl Eq for ApiVersion
impl StructuralPartialEq for ApiVersion
Auto Trait Implementations§
impl Freeze for ApiVersion
impl RefUnwindSafe for ApiVersion
impl Send for ApiVersion
impl Sync for ApiVersion
impl Unpin for ApiVersion
impl UnwindSafe for ApiVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more