45 of 410 menu

The min Function

The min function finds the smallest number from the parameters passed to it or the smallest number among the elements of an array.

Syntax

min(first number, second number....);
min(array of numbers);

Example

Let's find the smallest among the given numbers:

<?php echo min(1, 2, 3); ?>

Code execution result:

1

Example

Let's find the smallest value in the array:

<?php echo min([1, 2, 3]); ?>

Code execution result:

1

See Also

  • the max function,
    which finds the largest number
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline