Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Automator_Send_Webhook::string_to_binary_conversion( $string )

Convert comma separated array values in to binary


Parameters Parameters

$string

(Required)


Top ↑

Return Return

(string)


Source Source

File: src/core/lib/webhooks/class-automator-send-webhook.php

	private function string_to_binary_conversion( $string ) {
		$characters = str_split( $string );

		$binary = array();
		foreach ( $characters as $character ) {
			$data     = unpack( apply_filters( 'automator_send_webhook_string_to_binary_format', 'H*', $string ), $character );
			$binary[] = base_convert( $data[1], 16, 2 );
		}

		return implode( ' ', $binary );
	}