Found 1046 Articles for PHP

atan() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:43:59

81 Views

The atan() function return the arc tangent of a number. It returns a float, which is a numeric value between -Pi/2 and Pi/2 radians.Syntaxatan(val)Parametersval − The value for which you want to get the arc tangent.ReturnThe atan() function returns the arc tangent of a number.Example Live DemoOutput1.5208379310731.10714871779410.54041950027058-0.54041950027058

asinh() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:36:21

107 Views

The asinh() function returns the inverse hyperbolic sine of a number.Syntaxasinh(num)Parametersnum − The number to be specified.ReturnThe asinh() function returns the inverse hyperbolic sine of a number.Example Live DemoOutput0.881373587019541.3258977669011

asin() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:36:44

94 Views

The asin() function returns the arc sine of a number. It specifies a number in the range -1 to 1. Returns NaN, if num is not in the range -1 to 1.Syntaxasin(num)Parametersnum − The number for which you want to return the arc sine. Specifies a number in range -1 to 1.ReturnThe asin() function returns the arc sine of a number. It specifies a number in the range -1 to 1. Returns NaN, if num is not in the range -1 to 1.Example Live DemoOutput0.5235987755983-1.1197695149986Let us see another example −Example Live DemoOutput01.5707963267949-1.5707963267949NAN

acosh() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:37:08

93 Views

The acosh() function returns the inverse hyperbolic cosine of the specified number.Syntaxacosh(num)Parametersnum − The number for which we want the inverse hyperbolic cosine.ReturnThe acosh() function returns the inverse hyperbolic cosine of a number.Example Live DemoOutput01.0469679150032

acos() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:37:44

112 Views

The acos() function returns the arc cosine of a number. It specifies a number in the range -1 to 1. Returns NaN, if num is not in the range -1 to 1.Syntaxacos(num)Parametersnum − The number for which you want to return the arc cosine. A number in range -1 to 1.ReturnThe acos() function returns the arc cosine of the specified number.Returns NaN, if number is not in the range -1 to 1.Example Live DemoOutput1.04719755119662.6905658417935Let us see another example −Example Live DemoOutput1.570796326794903.1415926535898NAN

abs() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:38:08

171 Views

The abs() function returns the absolute value of a number.Syntaxabs(num)Parametersnum − The number for which we want to get the absolute value. If the num is float, then the return type will be float, otherwise it is an integer.ReturnThe abs() function returns the absolute value of the specified number.Example Live DemoOutput3.19.7Let us see another example −Example Live DemoOutput2050

number_format() function in PHP

Samual Sam
Updated on 26-Dec-2019 07:21:15

239 Views

The number_format() function is used to format a number with grouped thousands.Syntaxnumber_format(num,decimals,decimal_pt,separator)Parametersnum − The number to be formatted.decimals − Specifies how many decimals.decimal_pt − The string to be used for decimal point.separator − Specifies the string to be used for thousands separator.ReturnThe number_format() function returns the formatted number.ExampleThe following is an example − Live DemoOutputThe following is the output −10,000,000ExampleLet us see another example − Live DemoOutputThe following is the output −4,000

nl_langinfo() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:23

39 Views

The nl_langinfo() function has contained information about language and locale. Note − This function won’t work on Windows. Syntax nl_langinfo(ele) Parameters ele − Specify what element to return. Should be any of the following elements − Time and Calendar − ABDAY_(1-7) - Abbreviated name of the numbered day of the week DAY_(1-7) - Name of the numbered day of the week (DAY_1 = Sunday) ABMON_(1-12) - Abbreviated name of the numbered month of the year MON_(1-12) - Name of the numbered month of the year AM_STR - String for Ante meridian PM_STR - String for Post ... Read More

explode() function in PHP

Samual Sam
Updated on 24-Jun-2020 13:28:14

252 Views

The explode() function is used to split a string by string.Syntaxexplode(delimiter, str, limit)Parametersdelimiter − The boundary stringstr − String to splitlimit − Specifies the number of array elements to return.The following are possible values −Greater than 0 - Returns an array with a maximum of limit element(s)Less than 0 - Returns an array except for the last -limit elements()0 - Returns an array with one elementReturnThe explode() function returns an array of strings.The following is an example −Example Live DemoThe following is the output −OutputArray (    [0] => This    [1] => is    [2] => demo    [3] => ... Read More

convert_cyr_string() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:23

37 Views

The convert_cyr_string() function is used to convert from one Cyrillic character set to another. The supported Cyrillic character-sets are − k - koi8-r w - windows-1251 i - iso8859-5 a - x-cp866 d - x-cp866 m - x-mac-cyrillic Syntax convert_cyr_string(str, from, to) Parameters str − String to format from − The source Cyrillic character set, as a single character. to − The destination Cyrillic character set, as a single character. Return The convert_cyr_string() function returns the converted string. The following is an example − Example Live Demo ... Read More

Advertisements