PHPKonf 2025 Baku

Voting

: max(four, three)?
(Example: nine)

The Note You're Voting On

cHao
12 years ago
If you're trying to check whether the version of PHP you're running on is sufficient, don't screw around with `strcasecmp` etc. PHP already has a `version_compare` function, and it's specifically made to compare PHP-style version strings.

<?php
if (version_compare(phpversion(), '5.3.10', '<')) {
// php version isn't high enough
}
?>

<< Back to user notes page

To Top