stringToHex()
Convert a string to hex string
Method signature
private function stringToHex($str)
Parameters
Name
Type
Description
str
string
Any string to convert to hex format
Example
<?php
require 'vendor/autoload.php';
use CircularProtocol\Api\CircularProtocolAPI;
$circular = new CircularProtocolAPI();
$text = "Hello, World!";
$result = $circular->stringToHex($text);
echo $result;
Result
The result will be an object of type String:
48656c6c6f2c20576f726c6421
Last updated