php round() function


Translation results:

英[raʊnd] 美[raʊnd]

adj. Round; arc-shaped; plump, fat; integer

adv. Everywhere; around; roundabout ; in the opposite direction

prep.approximately; around, surrounding; (indicating position) around; nearby

n. circle, circle; cycle; round object, spherical object; (Meeting) One round

Third person singular: rounds Plural: rounds Present participle: rounding Past tense: rounded Past participle: rounded Comparative: rounder Superlative: roundest

php round() functionsyntax

Function:The round() function is used to round floating point numbers

Syntax:round(X,prec)

Parameters:

Parameters Description
X To be done Processed numbers
prec Specify the number of digits after the decimal point

Description:Return the result of rounding parameter X according to the number of digits after the decimal point prec. prec can be a negative number or 0, and 0 is the default value.

php round() functionexample


Run instance»

Click the "Run instance" button to view the online instance

Output:

1.56*****10*****-5

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

-6

Popular Recommendations

Home

Videos

Q&A