PHP base64_encode()

📔 : PHP 🔗

PHP में base64_encode() function , MIME base64 के साथ data को encode करता है। base64 encoded data 33% ज्यादा space consume करता है। means Original data से encoded data 33% ज्यादा बड़ा होता है।

PHP base64_encode Syntax

base64_encode ( string $string )
  1. string $string | required : string value जिसे encode करना है।

  2. Return Value : base64 encoded string return करता है।


PHP base64_encode Example

<?php
	$str = "Hello world !";
	echo base64_encode($str);
?>

Output
SGVsbG8gd29ybGQgIQ==

base64 encoded string को decode करने के लिए base64_decode() function का use किया जाता है।

Related Topics :

Rahul Kumar

Rahul Kumar

Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)

Get connected with me. :) LinkedIn Twitter Instagram Facebook