Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to compare two versions in php

// Syntax 
version_compare(string $version1, string $version2, ?string $operator = null): int|bool
// operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne

// Examples
version_compare('8.5.0', '8.0.0', '>='); // returns true
version_compare('8.5.0', '8.0.0', '<'); // returns false
Comment

PREVIOUS NEXT
Code Example
Php :: post type taxonomy loop wordpress 
Php :: password strength php 
Php :: install phpUnit in php by composer 
Php :: remove action from theme wordpress 
Php :: table drop foreign php laravel 
Php :: browser detection php 
Php :: php remove element from array 
Php :: how to generate random string in laravel 
Php :: laravel drop column 
Php :: centos update php 7 to php 8 
Php :: the action you have requested is not allowed. in codeigniter 
Php :: get first day of current month php 
Php :: eloquent model sort by ascending order 
Php :: laravel route slug 
Php :: laravel where like 
Php :: php clone object 
Php :: laravel base64 decode save file 
Php :: Allowed memory size of 1610612736 bytes exhausted laravel 
Php :: check session php 
Php :: PHP Numeric String 
Php :: php var exists 
Php :: root directory in php 
Php :: how to add property to an object in php 
Php :: How do I check if a string contains a specific word? 
Php :: ubuntu install lamp and phpmyadmin 
Php :: laravel redirect back url with message 
Php :: create form request laravel 
Php :: simple localhost php 
Php :: get url link in php 
Php :: carbon laravel d m y to y-m-d 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =