Found 1046 Articles for PHP

decoct() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:49:13

38 Views

The decoct() function converts a decimal number to an octal. It Returns an octal string of the specified decimal.Syntaxdecoct(num)Parametersnum − The decimal value to convert.ReturnThe decoct() function Returns an octal string of the specified decimal.Example Live DemoOutput106Let us see another example −Example Live DemoOutput72547141460

dechex() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:41:43

34 Views

The dechex() function converts decimal to hexadecimal. It Returns the hexadecimal string of the specified decimal.Syntaxdechex(num)Parametersnum − The decimal value to be convertedReturnThe dechex() function Returns the hexadecimal string of the specified decimal.Example Live DemoOutputf7c6

decbin() function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:38:57

61 Views

The decbin() function converts a decimal number to binary number.Syntaxdecbin(num)Parametersnum − Specifies a number to be converted to binary.ReturnThe decbin() function Returns a string representing the binary number of the decimal value.Example Live DemoOutput111100011001ExampleLet us see another example − Live DemoOutput1100011

cosh() function in PHP

Samual Sam
Updated on 26-Dec-2019 10:35:17

81 Views

The cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.Syntaxcosh(num)Parametersnum − Specifies a number in radiansReturnThe cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.Example Live DemoOutput1.54308063481521.5430806348152ExampleLet us see another example − Live DemoOutput1Example Live DemoOutput11.591953275522267.74676148375

cos() function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:34:00

78 Views

The cos() function Returns the cosine of a number. A numeric value between -1 and 1 is Returned representing the cosine of the angle.Syntaxcos(num)Parametersnum − The specified value in radiansReturnThe cos() function Returns cosine of a number in float. A numeric value between -1 and 1 is Returned representing the cosine of the angle.Example Live DemoOutput0.540302305868140.54030230586814ExampleLet us see another example − Live DemoOutput1

ceil() function in PHP

Samual Sam
Updated on 26-Dec-2019 10:32:49

190 Views

The ceil() function rounds a number to the nearest integer. The value is rounded up to the nearest greatest integer.Syntaxceil(num)Parametersnum − The number to round upReturnThe ceil() function Returns the value rounded up to the nearest (up) integer.Example Live DemoOutput11ExampleLet us see another example − Live DemoOutput2ExampleLet us see another example − Live DemoOutput9-9

bindec() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:42:52

69 Views

The bindec() function convert a binary number to decimal number.Syntaxbindec(bin_str)Parametersbin_str − The binary string to convertReturnThe bindec() function returns decimal value of the specified string bin_strExample Live DemoOutputThe output displays that the bindec() function returns a decimal value:13

base_convert() function in PHP

Samual Sam
Updated on 26-Dec-2019 10:31:17

52 Views

The base_convert() function converts a number from one base to another, for example, octal number to decimal number. The base mentioned here should be between 2 and 36. Digits in numbers with a base greater than 10 is represented with the letters a-z i.e a is 10, , d is 13, z is 35, etc.Syntaxbase_convert(num, original_base, to_base)Parametersnum − The number to convertoriginal_base − The original base. The base mentioned here should be between 2 and 36. Digits in numbers with a base greater than 10 is represented with the letters a-z i.e a is 10, , d is 13, z ... Read More

atanh() function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:29:37

64 Views

The atanh() function returns the inverse hyperbolic tangent of the specified number.Syntaxatanh(num)Parameters num − The specified number. Required.ReturnThe atanh() function returns a float value, which is the hyperbolic tangent of a number.Example Live DemoOutputINF-INFExampleLet us see another example − Live DemoOutput1.05930617082321.4722194895832-1.4722194895832ExampleLet us see another example − Live DemoOutput0

atan2() function in PHP

Samual Sam
Updated on 26-Dec-2019 10:28:28

91 Views

The atan2() function returns the arc tangent of two variables.Syntaxatan2(val1, val2)Parametersval1 − The dividendval2 − The divisorReturnThe atan2() function returns the arc tangent of val2/ val1 in radians. The returned value is between -Pi and Pi.Example Live DemoOutput0.785398163397450.78539816339745ExampleLet us see another example − Live DemoOutput-2.3561944901923-2.2318394956456

Advertisements