
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1060 Articles for PHP

315 Views
In PHP, iconv_mime_encode() function is used to composes a MIME header field. This is an inbuilt PHP function.Syntaxstring iconv_mime_encode(string $field_name, string $field_value, array $options=[])The iconv_mime_encode() function is used to compose and return a string that represents a valid MIME header field, which looks like -Subject: =ISO-8859-1?Q?Pr=FCfung_f=FFCr?= Entwerfen von einer MIME kopfzeileNote− In the above example, Subject - is the field name, and the portion that begins with "=ISO-8859-1?..." is the field value.Parametersiconv_mime_encode() accepts three different parameters − $field_name, $field_value and $options.$field_name − This parameter is used for the field name.$field_value − This parameter is used for the field value.$options − ... Read More

447 Views
In PHP, iconv_mime_decode() function is used to decode a MIME header field. This is an inbuilt function in PHP that is used from the PHP 5 version.SyntaxString iconv_mime_decode(string $string, int $mode, string $encoding)ParametersThe iconv_mime_decode() accepts three different parameters− $string, $mode and $encoding. $string and $mode are mandatory parameters, but $encoding is optional.$string − The $string parameter is used for the encoded header. It is a string-type parameter.$mode − The $mode parameter determines the behavior in the event iconv_mime_decode() it encounters the malformed MIME header field. We can specify any combination of the below-given bitmasks.List of bitmasks acceptable to iconv_mime_decode_headers()ICONV_MIME_DECODE_STRICTICONV_MIME_DECODE_CONTINUE_ON_ERRORICONV_MIME_DECODE_STRICT − ... Read More

203 Views
In PHP, iconv_mime_decode_headers() function is used to decode multiple MIME header fields at once. It is an in-built function in PHP.Syntaxiconv_mime_decode_headers($str_headers, $int_mode, $str_encoding)ParameterThe iconv_mime_decode_headers() function accepts three different parameters− $headers, $mode and $encoding.$headers − The $header parameter is used for the encoded headers. It is a string type parameter.$mode − The $mode parameter determines the behavior in the event iconv_mime_decode_headers() encounters a deformed MIME header field. We can use any combination of the following bitmasks.List of bitmasks acceptable to iconv_mime_decode_headers()ICONV_MIME_DECODE_STRICTICONV_MIME_DECODE_CONTINUE_ON_ERRORICONV_MIME_DECODE_STRICT - If the iconv_mime_decode_strict is set, the given header is decoded in full conformance but this option is disabled by ... Read More

188 Views
In PHP, the iconv_get_encoding() function is used to retrieve the internal configuration variables of iconv extension. This function is an inbuilt PHP function which is being used from PHP 4 version.Syntaxmixed iconv_get_encoding($type = "all")ParameterThe iconv_get_encoding() function is used only single parameter $type.$type − The values of the optional type parameter can beallinput_encodingoutput_encodinginternal_encodingReturn ValueThe iconv_get_encoding() function returns the current value of the internal configuration variable if successful or it returns False on failure. If the type is not present or set to all, then iconv_get_encoding() returns an array that stores all these variables.Example 1 Live Demo Outputarray(3) { ["input_encoding"]=> ... Read More

211 Views
In PHP, the bcsqrt() function is used to get the square root of an arbitrary precision number. It accepts the arbitrary precision number as a string and gives the square root of the number after scaling the result to the specified precision.Syntaxstring bcsqrt($num_string, $scale)ParametersThe bcsqrt() function accepts two different parameters: $num_string and $scale.$num_string − It represents the number whose square root to be evaluated. It is a string-type parameter.$scale − It indicates the number of digits that appear after the decimal point in the output.Return ValueThe bcsqrt() function returns the square root of the number as a string.Example 1OutputOutput without ... Read More

260 Views
In PHP, bcscale() function is used to set the default parameter for all bc math functions. This function sets the default scale parameter for all following calls to the bc math functions that do not explicitly specify a scale parameter.Syntaxint bcscale($scale)ParametersThe $bcscale() parameter accepts only a single parameter and it is the mandatory integer type parameter. This parameter shows the number of digits which come after the decimal. Its default value is 0.Return ValueThe $bcscale() function returns the old scale value.Example 1Output113.55960 113.5 113.55957Example 2Output113.55960 113.55 113.559

224 Views
In PHP, bcpowmod() function is used to raise an arbitrary precision base number to another exponent number, reduced by a specified modulus. The bcpowmod() function accepts three arbitrary precision numbers as strings and it returns the base number raised to the exponent modulo number after scaling the result to the specified precision.SyntaxString bcpowmod($base, $exponent, $modulus, $scale)ParametersThe bcpowmod() function accepts four different parameters− $base, $exponent, $modulus and $scale.$base− It represents the left operand. It is a string type parameter.$exponent− It represents the right operand number which represents the exponent. It is a string type parameter.$modulus− The $modulus parameter accepts the operand ... Read More

797 Views
In PHP, bcsub() math function is used to subtract one arbitrary precision number from another number. The bcsub() function takes two arbitrary precision numbers as strings and it gives the subtraction of the two numbers after scaling the result to an identified precision.Syntaxstring bcsub ($num_str1, $num_str2, $scaleVal)ParametersThe bcsub() math function accepts three different parameters $num_str1, $num_str2 and $scaleVal.$num_str1 − It represents the left operand and it is the string type parameter.$num_str2 − It represents the right operand and it is the string type parameter.$scaleVal − It is the optional integer type parameter that is used to set the number of digits after ... Read More

1K+ Views
In PHP, bccomp() function is used to compare two arbitrary numbers. The bccomp() function takes two arbitrary precision numbers as strings and gives the output as an integer after comparing the two numbers.Syntaxint bccomp($left_string1, $right_string1, $scaleval)ParametersThe bccomp() function accepts three different parameters− $left_string1, $right_string2 and $scaleval.$left_string1− It represents the left operand of one of two given numbers which we want to do the comparison and it is a string type parameter.$right_string2− It represents the right operand of one of two given numbers which we want to do the comparison and it is a string type parameter.$scaleval− It returns the number ... Read More

761 Views
In PHP, bcdiv() math function is used to divide one arbitrary precision number from another number. The bcdiv() function takes two arbitrary precision numbers as strings and it gives the result as a division of two numbers after scaling the result to an identified precision. Or, we can say that the bcdiv() PHP function divides the dividend by the divisor.Syntaxstring bcdiv($num_string1, $num_string2, $scaleVal)ParametersThe bcmul() math function accepts three different parameters $num_string1, $num_string2 and $scaleVal.$num_string1 − It represents the dividend and it is the string type parameter.$num_string2 − It represents the divisor, it is the string type parameter.$scaleVal − It is the optional ... Read More