PHP | base64_decode() Function Last Updated : 08 Jul, 2021 Comments Improve Suggest changes Like Article Like Report The base64_decode() is an inbuilt function in PHP which is used to Decodes data which is encoded in MIME base64.Syntax: string base64_decode( $data, $strict ) Parameters: This function accepts two parameter as mentioned above and described below: $data: It is mandatory parameter which contains the encoded string.$strict: It is an optional parameter. If this parameter is set to TRUE then the base64_decode() function will return FALSE if the input contains character from outside the base64 alphabet. Invalid characters will be silently discarded. Return value: This function returns the decoded string on success or returns False in case of failure.Below programs illustrate the base64_decode() function in PHP:Program 1: php <?php // Program to illustrate base64_decode() // function $str = 'R2Vla3Nmb3JHZWVrcw=='; echo base64_decode($str); ?> Output: GeeksforGeeks Program 2: php <?php // Program to illustrate base64_decode() // function $str = 'R0ZHLCBBIGNvbXB1dGVyIFNjaWVuY2UgUG9ydGFsIEZvciBHZWVrcw'; echo base64_decode($str). "\n"; $str = 'MQ=='; echo base64_decode($str). "\n"; ?> Output: GFG, A computer Science Portal For Geeks 1 Reference: http://php.net/manual/en/function.base64-decode.php Comment More infoAdvertise with us Next Article PHP | base64_decode() Function R R_Raj Follow Improve Article Tags : Misc Web Technologies PHP PHP-function Practice Tags : Misc Similar Reads PHP | base64_encode() Function The base64_encode() function is an inbuilt function in PHP that is used to encode data with MIME base64. MIME (Multipurpose Internet Mail Extensions) base64 is used to encode the string in base64. The base64_encoded data takes 33% more space than the original data. Syntax: string base64_encode( $dat 1 min read PHP imap_base64() Function The imap_base64() function is an inbuilt function in PHP that is used to decode the base64 encoded text. Syntax: imap_base64(string $string)Parameters: This function accepts only one parameter which is described below. $string: This is the base64 string parameter that is going to be decoded.Return V 1 min read PHP | utf8_decode() Function The utf8_decode() function is an inbuilt function in PHP which is used to decode a UTF-8 string to the ISO-8859-1. This function decodes back to the encoded string which is encoded with the utf8_encode() function. Syntax: string utf8_decode( string $string ) Parameter: This function accepts single 2 min read PHP decoct( ) Function In the earlier days of computing, octal numbers and the octal numbering system was very popular for counting inputs and outputs because as it works in counts of eight, inputs and outputs were in counts of eight, a byte at a time. Due to a wide usage of octal number system many times it happens that 2 min read PHP | json_decode() Function The json_decode() function is an inbuilt function in PHP which is used to decode a JSON string. It converts a JSON encoded string into a PHP variable. Syntax: json_decode( $json, $assoc = FALSE, $depth = 512, $options = 0 ) Parameters: This function accepts four parameters as mentioned above and des 2 min read PHP base_convert( ) Math Function The base_convert() function in PHP is used to convert a number given in an arbitrary base to a desired base. Both the base should be between 2 and 32 and bases with digits greater than 10 are represented with letters a-z i.e 10 is represented as a, 11 is represented as b and 35 is represented as z. 2 min read PHP decbin( ) Function While working with numbers, many times we need to convert the bases of number and one of the most frequent used conversion is decimal to binary conversion. PHP provides us with a built-in function, decbin() for this purpose.The decbin() function in PHP is used to return a string containing a binary 1 min read PHP mb_check_encoding() Function The mb_check_encoding() function is an inbuilt function in PHP that is used to check whether a given string is valid for specified encoding or not. Syntax: bool mb_check_encoding( array|string|null $value = null, string $encoding = null ) Parameters: This function accepts two parameters that are des 2 min read PHP mb_detect_encoding() Function The mb_detect_encoding() is an inbuilt function in PHP that is used to detect the encoding of the string. Syntax: string|false mb_detect_encoding( string $string, array|string|null $encodings = null, bool $strict = false ) Parameters: This function accepts three parameters that are described below. 2 min read PHP mb_convert_encoding() Function The mb_convert_encoding() function is an inbuilt function in PHP that transforms the string into another character encoding. Syntax: mb_convert_encoding( array|string $string, string $to_encoding, array|string|null $from_encoding = null ): array|string|falseParameters: This function has 3 parameters 1 min read Like