PHP gmp_import() FunctionThe PHP GMP import function converts string values into a binary value. We can operate the mathematical function of string data using the gmp_import() function. SyntaxThe following syntax shows the PHP GMP import function. ParametersAs shown above syntax and explained below, the GMP gmp_import() function takes three parameters:
Return ValuesIf the function works, a string is returned. If it doesn't work, FALSE is returned. ExamplesThe following example shows the multiple types of import function operations using different data. Example1: the following example shows gmp_import() function with basic value. The given parameter shows import values of the negative and positive numbers. Output: The following output shows the gmp_import() function and its data. Example2: the following example shows a value with the variable value. Output: The following output shows the gmp_import() function and its data. Example3: the import function uses number count with a basic GMP parameter. We can see the difference between default word count and user word count. Output: The following output shows the gmp_import() function and its data. Example4: the following example shows a value with the string variable value. Here, we use capital string data to convert it into binary numbers. Output: The following output shows the gmp_import() function and its data. Example5: the following example shows a value with the string variable value. Here, we use lowercase string data to convert it into a binary number. Output: The following output shows the gmp_import() function and its data. Example6: the following example shows a value with the string variable value. Here, we use different string data to convert them into binary numbers. The example uses the same string letters with different letters and different data. Output: The following output shows the gmp_import() function and its data. Example7: the following example shows a value with the string variable value. Here, we use lowercase string data to convert it into a binary number. The addition and division operation work with binary values. Output: The following output shows the gmp_import() function and its data. ConclusionThe division "gmp_import ()" function uses the GMP parameter for conversion operation. It gets the binary value or number of the given string parameters. The function removes complicated and large-size conversion operations code using function and values. Next TopicPHP gmp_intval() Function |